Re: Animated button

2008-02-26 Thread Ken Ferry
Or, if you had a sequence of CGImages you wanted to show in a loop, you could do this to kick off the animation. CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"contents"]; animation.calculationMode = kCAAnimationDiscrete; animation.values = arrayOfCGImageF

NSTextField and NSTextAttachment

2008-02-26 Thread Sean Willson
i've created a NSTextView and placed one or more NSTextAttachment within it that wrap controls and i'm able to get the behavior of clicking the control etc as i want. however when i place the same NSTextAttachment in a NSTextField via: [textField setAttributedStringValue:[NSAttributedStrin

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Andy Lee
On Feb 26, 2008, at 10:27 PM, Jim Murry wrote: It may be, but one would have to take the steps to make sure that each item is unique. NSMutableDictionary does that automatically. Wait, am I missing something? Doesn't NSMutableSet also ensure uniqueness -- as in *set* membership? Anyway,

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Jim Murry
It may be, but one would have to take the steps to make sure that each item is unique. NSMutableDictionary does that automatically. Jim On Feb 26, 2008, at 7:18 PM, Andy Lee wrote: Wouldn't it be cheaper to put the URLs into an NSMutableSet, if you're discarding the names anyway? --Andy

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Andy Lee
Wouldn't it be cheaper to put the URLs into an NSMutableSet, if you're discarding the names anyway? --Andy On Feb 26, 2008, at 9:08 PM, Jim Murry wrote: Populate an NSMutableDictionary using our objects: setObject:@"Sam" forKey:@"http://www.aol.com"; setObject:@"Adam" forKey:@"http://www.d

Re: [NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Jamie Phelps
Ah, please disregard my last message. I had a stupid error in IB. Move along; nothing to see here... Jamie ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

Re: [NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Jamie Phelps
On Feb 26, 2008, at 7:55 PM, Rob Keniger wrote: I have made a few changes to your code, including using - mouseDragged: to handle the oval drawing instead of -mouseUp: and I think it achieves what you are probably looking for. Rob, thanks for your response and the pointers. I made those chan

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Jim Murry
Populate an NSMutableDictionary using our objects: setObject:@"Sam" forKey:@"http://www.aol.com"; setObject:@"Adam" forKey:@"http://www.digg.com"; setObject:@"Jane" forKey:@"http://www.ibm.com"; setObject:@"John" forKey:@"http://www.aol.com"; then use allKeys from dictionary to return the uniqu

Re: [NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Rob Keniger
On 27/02/2008, at 11:05 AM, Jamie Phelps wrote: Hey, guys. I'm having what I assume is a simple problem. [NSBezierPath fillRect:[self bounds]]; fills my NSView subclass fine the first time drawRect: is called, but breaks the frame on redraw. Here is some more code for context if needed. I

how to know current page?

2008-02-26 Thread norio
Hi, I'm wondering how to know current printing page in drawPageBorderWithSize? Here's my drawPageBorderWithSize of my view: - (void)drawPageBorderWithSize:(NSSize)borderSize { unsigned long pageNum = [[NSPrintOperation currentOperation] currentPage]; NSLog (@"%ld",pageNum); } But th

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Philip Bridson
OK, I think I understand what you want to do now. You want to retrieve the one set of values and then filter them based on their individual values. Am I understanding right now? If this is what you want to do then I am afraid you cannot do this in interface builder. You would need to do this

Re: Event Logging

2008-02-26 Thread Tommy Nordgren
On 26 feb 2008, at 14.31, Philip Bridson wrote: Yeah that is what I mean. I was reading in the Documentation though that paths to file system folders should not be hard coded. This may sound a little dumb but is the freopen a C function? I used to write in C++ before Obj-C so I haven't use

Undo menu strings

2008-02-26 Thread Quincey Morris
On Feb 26, 2008, at 16:06, Brian Williams wrote: OK Quincey I'll bite, how did you do it? I am interested in how to more efficiently integrate the undo menu stuff into my CD project. Well, you asked for it ... Basically I co-opted KVC's keyPath mechanism. The easiest case is setting a s

Re: Observing with GC

2008-02-26 Thread Mark Piccirelli
On Feb 26, 2008, at 2:36 PM, Graham wrote: I hesitate to weigh in on an established thread, but I ran into this myself a while back. Isn't part of the purpose of the observer mechanism to allow observees to proceed with their normal activities blissfully unaware of any observers that migh

[NSBezierPath fillRect:[self bounds]] question

2008-02-26 Thread Jamie Phelps
Hey, guys. I'm having what I assume is a simple problem. [NSBezierPath fillRect:[self bounds]]; fills my NSView subclass fine the first time drawRect: is called, but breaks the frame on redraw. Here is some more code for context if needed. I tried adding the initial background fill to an aw

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Adam Gerson
Thanks for the example. What I am looking for is slightly diferent. Lets say I have a entity called FavoriteWebsites with the attributes name and url. The current contents of the object are Name | URL - Sam | http://www.aol.com Adam |

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Philip Bridson
Hi there, It will only return results from itself. Its like the classic example of employee and department. If you had a table that you wanted to link to a list of employees you would bind to the employee array controller and vice versa for the department one. You cannot bind against the d

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Adam Gerson
I did look into NSPredicate and the Predicate Programming Guide. I understand the concept of filtering the ArrayController. I just didn't know how to write en expression asking for all unique values from the ArrayController for a given key. In the Predicate examples they filter a single potential r

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi, Sure... Make 2 layers one is the 'background' the other is the button (think the 'on/off' switch in time machine prefs pane) when the user clicks the button you switch it to the on or off position with buttonLayer.position = oppositePosition (a CGPoint) make sense? If not please feel

Re: Observing with GC

2008-02-26 Thread Quincey Morris
On Feb 26, 2008, at 14:36, Graham wrote: Isn't part of the purpose of the observer mechanism to allow observees to proceed with their normal activities blissfully unaware of any observers that might be looking at 'em? In which case they won't be keeping track of their observers so have no

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-26 Thread John Stiles
Trying to simulate the drawing behavior of NSCell seems error-prone to me. Since I don't have access to the original code, it would be hard to match its behavior. I'd much rather inherit as much as I can and only customize around the edges. Ken Ferry wrote: No, you'd draw whatever you feel l

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Philip Bridson
Yeah there is. From the documentation: You can set a predicate for an array controller to filter the content array. You can set the predicate in code (using setFilterPredicate:). You can also bind the array controller's filterPredicate binding to a method that returns an NSPredicate object

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-26 Thread Ken Ferry
No, you'd draw whatever you feel like drawing, possibly after processing it. You'd use methods from NSStringDrawing. It's also sometimes convenient to delegate drawing to what you think of as a subcell - I'd try to do that before pulling tricks like temporarily modifying self across a call to a s

Re: NSString floatValue issue

2008-02-26 Thread Graham
[NSString floatValue] won't evaluate expressions, only convert string representations of numbers. I have written a category on NSString that does evaluate expressions however; you can find it here: http://apptree.net/parser.htm HTH, S.O.S. On 27/02/2008, at 4:55 AM, C Sandeep w

Re: Observing with GC

2008-02-26 Thread Graham
I hesitate to weigh in on an established thread, but I ran into this myself a while back. Isn't part of the purpose of the observer mechanism to allow observees to proceed with their normal activities blissfully unaware of any observers that might be looking at 'em? In which case they won

Re: Force arrayController to remove immediately?

2008-02-26 Thread Justin Hawkwood
Thanks, but I used Ben's suggestion of The UndoManager's groups to solve this issue. On Feb 26, 2008, at 11:51 AM, Dave Hayden wrote: On Feb 16, 2008, at 12:31 PM, Justin Hawkwood wrote: I have an array controller bound in the NIB to a Core Data Entity, and a function to remove the selecte

Re: Observing with GC

2008-02-26 Thread Chris Suter
On 27/02/2008, at 4:59 AM, Quincey Morris wrote: On Feb 26, 2008, at 02:42, Chris Suter wrote: The observation info uses a weak reference and it will have been zeroed before finalize is called so neither of the above are a problem. Even so, I'm not sure it's a good idea to call removeOb

Re: NSString floatValue issue

2008-02-26 Thread j o a r
On Feb 26, 2008, at 9:47 PM, C Sandeep wrote: Thanks for the ideas. Im using the class method to evaluate such strings, thusly: -(NSNumber *) getNumberFrom: (NSString *) str { NSScanner *scanner = [NSScanner scannerWithString: str]; int numerator, denominator; [scanner scanInt: &nume

Can CoreData return only unique results of an attribute

2008-02-26 Thread Adam Gerson
I have a core data object. I would like to populate a TableView with only the unique entires for a specific property. Clearly I could filter the results in code, I was wondering if there was away for core data and bindings to do it. Adam ___ Cocoa-dev m

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-26 Thread John Stiles
What would I do in my override? Temporarily set the text color, call super, and then revert it back? Ken Ferry wrote: The way NSCell deals with this is that the white color is never part of the value data itself, it's thought of as a draw-time visual effect. That is, rather than calling setTe

Re: NSURLConnection failing [SOLVED]

2008-02-26 Thread Nir Soffer
On Feb 25, 2008, at 18:18, Doug Penny wrote: NSURLConnection *imageConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if (!imageConnection) { NSLog(@"A problem was encountered while trying to download an image from %@", i

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-26 Thread Ken Ferry
The way NSCell deals with this is that the white color is never part of the value data itself, it's thought of as a draw-time visual effect. That is, rather than calling setTextColor, you could override -drawInteriorWithFrame:inView:. -Ken On Tue, Feb 26, 2008 at 11:35 AM, John Stiles <[EMAIL PR

Cocoa and Flash

2008-02-26 Thread Gordon Apple
What is the best way to incorporate the Flash player (with interactivity) in a Cocoa application? I haven't had much luck finding what I need on the Adobe site. Lots of questions in the archives, but few answers. Can this be done through WebView? I know that QT has had some Flash capabilit

Re: NSString floatValue issue

2008-02-26 Thread C Sandeep
Hi all, Thanks for the ideas. Im using the class method to evaluate such strings, thusly: -(NSNumber *) getNumberFrom: (NSString *) str { NSScanner *scanner = [NSScanner scannerWithString: str]; int numerator, denominator; [scanner scanInt: &numerator]; [scanner scanString:@"/"

Fwd: Chaging NSStatusItem menus.

2008-02-26 Thread Jeremy
Here's my approach and most of my code (since it has to be "under 25 kb"): - (void)menuWillOpen:(NSMenu *)menu { if([iTunes isRunning]) { if([[[iTunes currentTrack] artist] isEqualToString:@""]) { [one setTitle:@"Artist: N/

Re: QCView

2008-02-26 Thread Lorenzo
Thank you David, I have already a QCRenderer class to create OpenGL Textures from a QC, but in this case (a simple file browser) I have found the QCView useful enough. I have got the snapshot using my OpenGL routines (using the OpenGL context from the QCView) and it worked fine. Thanks for replying

Re: Use pdfkit to display a batch of pictures...

2008-02-26 Thread John Calhoun
On Feb 21, 2008, at 1:30 PM, Leopard x86 wrote: Most of us have been used to use Mac OS X preview to open pictures and pdf files. So my exact goal is to create an application of the Preview-style to show my CGImage pictures, in other words, to replace the page(PDFKit page object) of a displa

Re: Finding a relative date

2008-02-26 Thread Deborah Goldsmith
I did find myself still using NSCalendarDate because I wanted its - dayOfYear method. I wasn't worried about localization because my application is used by exactly one user in the middle of a cornfield in SW Michigan. But if someone knows, what is the way to get this with NSCalendar? I found

Re: indexForPage: page not found - Problem with PDFView on Tiger, works fine on Leopard

2008-02-26 Thread John Calhoun
On Feb 17, 2008, at 1:07 PM, Kevin Ross wrote: This snippet of code works fine on Leopard but not on Tiger. - (void)awakeFromNib { NSString *outPath = [@"~/Desktop/debug.pdf" stringByExpandingTildeInPath]; [self writeDebugPDFDocument:[self pdfDocument] toPath:outPath];

removeFrameUsingName: doesn't?

2008-02-26 Thread Mike Fischer
Hi! I'm trying to remove the saved window frame of a window from the application preferences. So let's say I have a global: NSString *name = @"My_window_name"; // Actually the name I am using is UUID so it should be globally unique. The NSWindow gets initialized using [window setFrameA

Re: Help with displaying encrypted PDF image

2008-02-26 Thread John Calhoun
On Feb 17, 2008, at 5:52 AM, Mario Gajardo Tassara wrote: Hi, im trying to displaying encrypted pdf formated images in cocoa. this is my code to load these images, but nothing is displayed, however non encrypted pdf displayed with zero problems. All my encrypted images seems to be decrypted

Re: Event Logging

2008-02-26 Thread Martin
Le 26 févr. 08 à 14:31, Philip Bridson a écrit : Yeah that is what I mean. I was reading in the Documentation though that paths to file system folders should not be hard coded. Yes.. I guess good programmers should use methods described in: http://developer.apple.com/documentation/Cocoa/Concep

Re: Force arrayController to remove immediately?

2008-02-26 Thread Dave Hayden
On Feb 16, 2008, at 12:31 PM, Justin Hawkwood wrote: I have an array controller bound in the NIB to a Core Data Entity, and a function to remove the selected item (from tableview) through that array controller. The problem is that I want to rescan the array controller to set some other var

Image Kit Programming Guide

2008-02-26 Thread Jim McKinnon
Has anyone created the application in the Image Kit Programming Guide? http://developer.apple.com/documentation/GraphicsImaging/Conceptual/ImageKitProgrammingGuide/Introduction/chapter_1_section_1.html#/ /apple_ref/doc/uid/TP40004907-CH1-DontLinkElementID_61 I tried twice, but the image in the

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-26 Thread John Stiles
Actually, for what it's worth, I did just hit one snag. If you attempt to edit the cell, the field editor inherits the white color! This makes it pretty difficult to see what you're doing ;) I have a custom field editor anyway and have lots of control over how the edit process gets started, so

Re: wiring up core data, bindings, NSArrayController and NSCollectionView

2008-02-26 Thread Philip Bridson
Hi there, I am no expert on core data but I have been using it extensively in my app over the past few months. From what I can see from your code it looks similar to what I have been doing and it works fine for me to be honest. What I think maybe the problem is that just because you have bo

Re: CoreData fetch is way too slow

2008-02-26 Thread James Hober
A while back, James Hober wrote: I simply changed the predicate from using LIKE to using == and fetch time plummeted from 7 seconds to 0.18 seconds. This is very usable. I think it is a better user experience to shave off the 3.5 seconds of launch time that my previous implementation needed in

wiring up core data, bindings, NSArrayController and NSCollectionView

2008-02-26 Thread Knud Hinnerk Möller
Hi, I'm a little confused about a setup involving core data, bindings, NSArrayControllers and an NSCollectionView. Things were fine before I used core data: - I have an NSCollectionView, where each view item represents a KNBox, which contains a list of KNDesktopThings, represented by a ta

Re: Creating a NSTextField

2008-02-26 Thread Gorazd Krosl
>> But there is no initialization method for a >> NSTextField. How can I >> create a NSTextField? Just alloc? > NSTextField is a subclass of NSControl. Use > [[NSTextView >alloc] - initWithFrame:]. Then use > -addSubview: on your window's -contentView. And since > your NSTextView is not instantiat

Re: Animated button

2008-02-26 Thread I. Savant
> I'd suggest core animation as the easiest route but i'm sort of partial. For my own enlightenment, can you outline generally how this would be accomplished with Core Animation? I'm very interested. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi Micha, I'd suggest core animation as the easiest route but i'm sort of partial. HTH, -bd- http://bill.dudney.net/roller/objc On Feb 26, 2008, at 8:37 AM, Micha Fuhrmann wrote: Hi everyone, what is the simplest way to implement an animated button (the animation should start as it is pre

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi Micha, I'd suggest core animation as the easiest route but i'm sort of partial. HTH, -bd- http://bill.dudney.net/roller/objc On Feb 26, 2008, at 8:37 AM, Micha Fuhrmann wrote: Hi everyone, what is the simplest way to implement an animated button (the animation should start as it is pre

Re: NSString floatValue issue

2008-02-26 Thread Hamish Allan
On Tue, Feb 26, 2008 at 6:12 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > As far as I know, there is no Math expression parser buit-in Cocoa. > You will have to write your own evaluator to do this. Or use e.g. NSTask with 'bc' (remembering to specify a scale for bc). Hamish __

Re: NSString floatValue issue

2008-02-26 Thread Jean-Daniel Dupas
As far as I know, there is no Math expression parser buit-in Cocoa. You will have to write your own evaluator to do this. Le 26 févr. 08 à 18:55, C Sandeep a écrit : Greetings, I need to evaluate a NSString as a float value (represented by NSNumber object). Here is my code snippet: N

Re: NSString floatValue issue

2008-02-26 Thread Randall Meadows
On Feb 26, 2008, at 10:55 AM, C Sandeep wrote: Greetings, I need to evaluate a NSString as a float value (represented by NSNumber object). Here is my code snippet: NSString *str = @"28/5"; NSNumber *nm = [NSNumber numberWithFloat:[str floatValue]]; NSLog(@"number: %@", nm ); t

Re: NSURLConnection failing [SOLVED]

2008-02-26 Thread Hamish Allan
On Tue, Feb 26, 2008 at 5:55 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > I'd call that a pretty serious garbage-collection bug in > NSURLConnection! Unless you'd sent it a -cancel, it ain't garbage. Unless you keep a strong reference to it, it *is* garbage. > On 2008 Feb, 25, at 8:18, Doug

Re: Spotlight Importer

2008-02-26 Thread Quincey Morris
On Feb 26, 2008, at 07:55, Sean McBride wrote: UTIs have no connection to creator codes. A UTI is defined in terms of: a) filename extension b) HFS type code c) MIME type A UTI _cannot_ be attached to a file as metadata, and a UTI cannot be determined by the system by examining the file's c

Re: Observing with GC

2008-02-26 Thread Quincey Morris
On Feb 26, 2008, at 02:42, Chris Suter wrote: The observation info uses a weak reference and it will have been zeroed before finalize is called so neither of the above are a problem. Even so, I'm not sure it's a good idea to call removeObserver: from the finalize method. A weak reference

Re: QCView

2008-02-26 Thread David Duncan
On Feb 26, 2008, at 7:03 AM, [EMAIL PROTECTED] wrote: I am building on 10.4 and I would like to get a preview of a Quartz Composition. The API snapshotImage works only on Leopard. So I have tried unsuccessfully to lockFocus drawRect and unlockFocus then save the TIFFRepresentation, which resu

Re: NSURLConnection failing [SOLVED]

2008-02-26 Thread Jerry Krinock
On 2008 Feb, 25, at 8:18, Doug Penny wrote: Turns out garbage collection was doing me in. When the NSURLConnection object was hanging out waiting for a response, it would get collected. I'd call that a pretty serious garbage-collection bug in NSURLConnection! Unless you'd sent it a -cancel

NSString floatValue issue

2008-02-26 Thread C Sandeep
Greetings, I need to evaluate a NSString as a float value (represented by NSNumber object). Here is my code snippet: NSString *str = @"28/5"; NSNumber *nm = [NSNumber numberWithFloat:[str floatValue]]; NSLog(@"number: %@", nm ); this results in: number: 28.0

Re: Nicely scaling a CALayer (interpolation?)

2008-02-26 Thread David Duncan
On Feb 26, 2008, at 1:42 AM, Martin wrote: I think that I need to tell my CALayer to use interpolation rather than linear scaling, right? I've tried to do that but this doesn't work: imageLayer.minificationFilter = kCAFilterNearest; The nearest filter is "nearest neighbor" or no interpolati

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-26 Thread John Stiles
Six of one and a half dozen of the other? :) Anyway, it looks like this does the trick: ([cell isHighlighted] && [[outlineView window] isKeyWindow] && [[outlineView window] firstResponder] == outlineView) Not quite as clean and nice as "backgroundStyle" but it will have to do for now :)

Re: Creating a NSView with Interface Builder

2008-02-26 Thread Rainer Brockerhoff
At 18:24 -0800 25/02/08, [EMAIL PROTECTED] wrote: >From: Herr Thomas Bartelmess <[EMAIL PROTECTED]> >Date: Mon, 25 Feb 2008 22:41:25 +0100 >Message-ID: <[EMAIL PROTECTED]> > >i'm currently working on a Plugin. My problem is that i have to provide a >preference View. I have to give a NSView to the

Re: Creating a NSTextField

2008-02-26 Thread Ken Worley
On Feb 26, 2008, at 9:13 AM, Felipe Monteiro de Carvalho wrote: But there is no initialization method for a NSTextField. How can I create a NSTextField? Just alloc? Generally more like: [[NSTextField alloc] initWithFrame:someRect]; Ken -- Ken Worley Software Engineer, Tiberius, Inc. __

Re: Creating a NSTextField

2008-02-26 Thread Jerry Krinock
On 2008 Feb, 26, at 8:13, Felipe Monteiro de Carvalho wrote: But there is no initialization method for a NSTextField. How can I create a NSTextField? Just alloc? NSTextField is a subclass of NSControl. Use [[NSTextView alloc] - initWithFrame:]. Then use -addSubview: on your window's -cont

Re: Table column index

2008-02-26 Thread Corbin Dunn
On Feb 25, 2008, at 4:41 PM, Quincey Morris wrote: On Feb 25, 2008, at 15:12, glenn andreas wrote: And it actually hints to the contrary, since -tableColumns is document to include the hidden columns as well (and doesn't say if they are at the end or in the middle) I just tried it, and

Re: Resizable Text Cell in NSTableView

2008-02-26 Thread Corbin Dunn
The general approach is to create a custom NSTextView subclass for the field editor, and to return it from an NSWindow subclass via - (NSText *)fieldEditor:(BOOL)createFlag forObject:(id)anObject. However, it isn't easy to get all the details right. Please do log bugs requesting this abilit

Re: Responding To Screen Saver/Sleep Events

2008-02-26 Thread Chris Schmitt
Nir, I tried to follow the example by putting the code from the page into my main.m file of a brand new application. The application complied and ran, but I was never notified of the events. Do you happen to have any sample code or something that might show me how this is implemented w

Creating a NSTextField

2008-02-26 Thread Felipe Monteiro de Carvalho
Hello, I am building Cocoa apps without the interface builder. Creating a NSWindow instance is really easy, and I can do: NSWindow* MainWindow = [[NSWindow alloc] initWithContentRect: MainWindowRect styleMask: NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSRe

Re: Animated button

2008-02-26 Thread I. Savant
> I've tried with a animated gif, unfortunately when pressed it doesn't > start the animation. That's because NSButtonCell really doesn't have the ability to animate an image on its own. The simplest setup is to use NSTimer to periodically 'advance' the frame of your animation by setting a new

Re: Spotlight Importer

2008-02-26 Thread Sean McBride
On 2/26/08 12:45 AM, Quincey Morris said: >On Feb 26, 2008, at 00:16, Gerriet M. Denkmann wrote: > >> I have an application (10.4.11) which creates simple text files >> (utf-8 or utf-16). >> When I store some document as "myNewFile" then Spotlight does know >> nothing about it's content. >> But wh

Re: Observing with GC

2008-02-26 Thread Sean McBride
On 2/26/08 12:01 AM, Quincey Morris said: >On Feb 25, 2008, at 21:08, Bill Bumgarner wrote: > >> In general, -finalize should not be used to manage scarce resource >> nor muck around with the app's object graph, including tearing down >> observations and the like. > > >I find it hard to see anythi

Animated button

2008-02-26 Thread Micha Fuhrmann
Hi everyone, what is the simplest way to implement an animated button (the animation should start as it is pressed)? I've tried with a animated gif, unfortunately when pressed it doesn't start the animation. I'm thinking in the line of replacing the button image frame by frame as it is

QCView (found)

2008-02-26 Thread archidea
Forget, I have found it. NSOpenGLContext*ctx = [oQCView openGLContext]; Then I render into a NSBitmapImageRep. Cool! Best Regards -- Lorenzo email: [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: RegisterProcess failed (error = -50) on NSAttributedString

2008-02-26 Thread Alastair Houghton
On 26 Feb 2008, at 05:44, Phill Kelley wrote: The NSAttributedString is the only reason why this app needs to link against AppKit. I used this program heavily during the second half of 2007. It was run about 6 times per hour, 24x7, via cron (three different sets of pages being monitored into

QCView

2008-02-26 Thread archidea
Hi, I am building on 10.4 and I would like to get a preview of a Quartz Composition. The API snapshotImage works only on Leopard. So I have tried unsuccessfully to lockFocus drawRect and unlockFocus then save the TIFFRepresentation, which results in an empty image. The line pdfData = [oQCView dataW

Re: still cant get bezier paths working for me.

2008-02-26 Thread Jerry Krinock
On 2008 Feb, 26, at 6:06, Development wrote: That's where the bezierpath is invoked from so focus is locked. Good. Always draw within drawRect: wherever possible. Further, in your case, make sure that all your invocations of - bezierPath, which draw your "pen"/mouse line, both present and

Re: still cant get bezier paths working for me.

2008-02-26 Thread Development
That's where the bezierpath is invoked from so focus is locked. On Feb 25, 2008, at 11:57 PM, Jerry Krinock wrote: Yes, and I don't see -lockFocus and -unlockFocus in your -bezierPath method. My first drawings didn't work until I did that. Except, if -bezierPath is invoked from within -dra

Re: Finding a relative date

2008-02-26 Thread Paul Bruneau
I am sympathetic to using NSCalendar. At his Boot Camp, Aaron told me that NSCalendarDate was falling out of favor because it's not a good player regarding calendars other than Gregorian. I understand this. However, the documentation really doesn't provide any direction as to this for a new

Re: Converting from Window to View Coordinates

2008-02-26 Thread Richard Somers
Bug report submitted to Apple. Problem ID: 5765530 Regards, Richard On Feb 25, 2008, at 8:49AM, Richard Somers wrote: So it would appear that the above statement is not exactly correct. The "1" value in the 1-based y coordinate apparently needs to be modified by the userSpaceScaleFactor.

Re: Event Logging

2008-02-26 Thread Philip Bridson
Yeah that is what I mean. I was reading in the Documentation though that paths to file system folders should not be hard coded. This may sound a little dumb but is the freopen a C function? I used to write in C++ before Obj-C so I haven't used it before. Is it best to use this method or to

Re: Event Logging

2008-02-26 Thread Martin
Le 26 févr. 08 à 11:53, Philip Bridson a écrit : Is event logging really as easy as just declaring the location of the application log directory and then passing the relevant event string to NSLog which will "know" where to write the event? I'm not sure what you mean when you say "event log

Event Logging

2008-02-26 Thread Philip Bridson
Is event logging really as easy as just declaring the location of the application log directory and then passing the relevant event string to NSLog which will "know" where to write the event? I can't find much about it in the documentation but what I have found is a little vague. Many th

Re: Observing with GC

2008-02-26 Thread Chris Suter
On 26/02/2008, at 7:01 PM, Quincey Morris wrote: I find it hard to see anything dangerous in the finalize strategy used in the above code, unless: (a) there's a possibility that the observer is being finalized around the same time, or (b) the finalize method tries to set one of the obser

Nicely scaling a CALayer (interpolation?)

2008-02-26 Thread Martin
Hi, I've got a CALayer with a CGImage as its contents. The CALayer's size is smaller than the image's original size, so the image is scaled down. But the scaled image is pixelated and I'd like a smooth image. I think that I need to tell my CALayer to use interpolation rather than linear s

Re: Spotlight Importer

2008-02-26 Thread Quincey Morris
On Feb 26, 2008, at 00:16, Gerriet M. Denkmann wrote: I have an application (10.4.11) which creates simple text files (utf-8 or utf-16). When I store some document as "myNewFile" then Spotlight does know nothing about it's content. But when I store the same file as "myNewFile.txt" then all

Spotlight Importer

2008-02-26 Thread Gerriet M. Denkmann
I have an application (10.4.11) which creates simple text files (utf-8 or utf-16). When I store some document as "myNewFile" then Spotlight does know nothing about it's content. But when I store the same file as "myNewFile.txt" then all is fine. Is there a way to tell Spotlight to treat all f

Re: Creating a NSView with Interface Builder

2008-02-26 Thread perego
Hello, i'm currently working on a Plugin. My problem is that i have to provide a preference View. I have to give a NSView to the programm. Currently i wrote a NSView Subclass, but its to much work to do every button an textfield by code. My question is, how can I design an View in Interface Builde

Re: Observing with GC

2008-02-26 Thread Quincey Morris
On Feb 25, 2008, at 8:38 PM, Rob Keniger wrote: On 26/02/2008, at 1:02 AM, glenn andreas wrote: Note that in the non-GC world, you can't do that in -dealloc (since the KVO "warning" about deallocating something that is still be observed happens before the call to dealloc), so it's unclear