How can I get the reference to Cancel and Print buttons in Print Dialogue

2009-08-09 Thread Siva Manne
In the Cocoa PDEPlugin, i need to disable/enable Cancel and Print Buttons for some conditions. I am not able to get the reference for those buttons. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator co

Re: NSMutableArray initWithCapacity and insertObject:atIndex

2009-08-09 Thread Henry McGilton (Boulevardier)
On Aug 9, 2009, at 9:59 PM, Adam Gerson wrote: I would like to insert objects out of order into an NSMutableArray. I create the array with NSMutableArray* cards = [[NSMutableArray alloc] initWithCapacity:5]; initWithCapacity simply makes an array large enough to contain that number of ele

Re: NSMutableArray initWithCapacity and insertObject:atIndex

2009-08-09 Thread Andrew Merenbach
On Aug 9, 2009, at 9:59 PM, Adam Gerson wrote: I would like to insert objects out of order into an NSMutableArray. I create the array with NSMutableArray* cards = [[NSMutableArray alloc] initWithCapacity:5]; When I try to call [cards insertObject:card atIndex:4]; I get the error: *** -[NS

Re: NSMutableArray initWithCapacity and insertObject:atIndex

2009-08-09 Thread Roland King
if you read the documentation on NSMutableArray it tells you exactly why! Capacity has nothing to do with the number of elements actually in the array and you can only insert an element with index less than or equal to the current count of the array. On Aug 10, 2009, at 12:59 PM, Adam Ger

Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-09 Thread Henry McGilton (Boulevardier)
On Aug 8, 2009, at 1:23 AM, Brian Bruinewoud wrote: Hi, I'm a little confused about how this code works: MyController *myController = [[ myController alloc ] initWithNibName: @"myView" bundle: nil ]; [[ self navigationController ] pushViewController: myController animated: Y

NSMutableArray initWithCapacity and insertObject:atIndex

2009-08-09 Thread Adam Gerson
I would like to insert objects out of order into an NSMutableArray. I create the array with NSMutableArray* cards = [[NSMutableArray alloc] initWithCapacity:5]; When I try to call [cards insertObject:card atIndex:4]; I get the error: *** -[NSCFArray insertObject:atIndex:]: index (4) beyond b

Trouble with event taps...

2009-08-09 Thread Nat Burke
Hi all, I'm having some difficulty with event taps. I am creating my event tap from the 'awakeFromNib' function for my overloaded NSWindow. The problem is that keyUp and keyDown events are never trapped in my callback. I can see all the mouse events, and even the modifier keys (shift, optio

CATransition + NSView mask

2009-08-09 Thread Evan M
I have a simple view transition, and am using a slide transition in combination with NSView's replaceSubview: with: method to swap a view's subviews. The problem I'm running into with this transition in particular is that it doesn't clip to the parent view. The views that are being swappe

Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-09 Thread Paul Collins
On Sat, Aug 8, 2009 at 10:40 PM, Brian Bruinewoud wrote: > as it could be? What would be the better way to achieve this? > > At a guess to my second question: I suppose the new view should call on > methods/properties of its File's Owner to discover what it needs to display. > I haven't tried this

Re: Color with pattern image

2009-08-09 Thread Rob Keniger
On 10/08/2009, at 8:18 AM, Mirko Viviani wrote: I'm using -[NSColor colorWithPatternImage:] to draw a background pattern image and I want to set a constraint for the drawing starting rectangle. The docs says that "The image is tiled starting at the bottom of the window" ... Is there any w

Re: Core Data - attribute to hold an array of strings

2009-08-09 Thread Kyle Sluder
On Aug 9, 2009, at 4:39 AM, parag vibhute wrote: Yes, you can. Only thing is you need to convert UIImage object to NSData object. There are two C APIs Good to know for the iPhone crowd, but the question was about NSImage, which is a Mac class. --Kyle Sluder ___

Color with pattern image

2009-08-09 Thread Mirko Viviani
Hi, I'm using -[NSColor colorWithPatternImage:] to draw a background pattern image and I want to set a constraint for the drawing starting rectangle. The docs says that "The image is tiled starting at the bottom of the window" I've tried to vertically flip the drawing context but the patt

Re: NSTimer not firing

2009-08-09 Thread Jerry Krinock
On 2009 Aug 09, at 09:26, Alastair Houghton wrote: I think the problem, therefore, is that you're trying to schedule your timer on the wrong thread (I guess you're expecting it to be scheduled on your app's main thread)? The performSelectorOnMainThread::: methods are your friend in situ

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread Dave Camp
On Aug 9, 2009, at 1:31 AM, John Michael Zorko wrote: Wow, it's late ... I forgot some of the code in the last email -- here's all of it (still not much, no worries). I see the "program exited with signal:0" error after this code runs for awhile, and there's no backtrace. ... and I run a

Re: NSTimer not firing

2009-08-09 Thread Alastair Houghton
On 9 Aug 2009, at 16:56, kentoz...@comcast.net wrote: I'm running an NSInvocationOperation in an NSOperationQueue and set up a listener for the operation's "isFinished" notification. My "observeValueForKeyPath" method is getting called when the operation finishes, but I'm finding that when

NSTimer not firing

2009-08-09 Thread kentozier
Hi I'm running an NSInvocationOperation in an NSOperationQueue and set up a listener for the operation's "isFinished" notification. My "observeValueForKeyPath" method is getting called when the operation finishes, but I'm finding that when I try to create a timer inside " observeValueForKeyP

Re: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?

2009-08-09 Thread Ken Thomases
On Aug 8, 2009, at 6:24 PM, Gabriele de Simone wrote: On Aug 8, 2009, at 2:37 PM, Keary Suska wrote: It used to be that if you overrode -[NSObject setValue:forUndefinedKey:] your own subclass was responsible for calling -[NSObject will/didChangeValueForKey: so that bindings and observers would

Re: Core Data - attribute to hold an array of strings

2009-08-09 Thread parag vibhute
Yes, you can. Only thing is you need to convert UIImage object to NSData object. There are two C APIs - UIImageJPEGRepresentation

Re: Core Data - attribute to hold an array of strings

2009-08-09 Thread Shlok Datye
Look for these classes in the documentation. If they conform to the NSCoding protocol they can be archived. If they don’t, they can’t, and you might be able to find something useful by googling for "SomeClass NSCoding". Shlok Datye Coding Turtle http://codingturtle.com On 09.08.2009, at 1

Re: Core Data - attribute to hold an array of strings

2009-08-09 Thread M.S. Hrishikesh
Can I use the same method for UIImage or NSImage also? On 09/08/09 3:48 PM, Shlok Datye wrote: Create an attribute of type "Binary Data". Encode your anArray of strings into an NSData using something like "NSData *arrayData = [NSArchiver archivedDataWithRootObject:anArray];". Finally, put arr

Re: Core Data - attribute to hold an array of strings

2009-08-09 Thread Shlok Datye
Create an attribute of type "Binary Data". Encode your anArray of strings into an NSData using something like "NSData *arrayData = [NSArchiver archivedDataWithRootObject:anArray];". Finally, put arrayData into the attribute. Shlok Datye Coding Turtle http://codingturtle.com On 09.08.2009,

Core Data - attribute to hold an array of strings

2009-08-09 Thread M.S. Hrishikesh
I created an Entity called MyPlaces. I want to store a number of strings inside MyPlaces. How do I create an attribute to hold an array of strings? I know how to create an Attribute to hold a single string but I need to hold an array of strings. One way is to create another Entity called Place

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread John Michael Zorko
Kyle et al, Wow, it's late ... I forgot some of the code in the last email -- here's all of it (still not much, no worries). I see the "program exited with signal:0" error after this code runs for awhile, and there's no backtrace. On my view controller is: - (void)showAnimation { //

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread John Michael Zorko
Kyle et al, BTW, the issue I see is the infamous "program exited with signal:0" error, with no backtrace. On Aug 8, 2009, at 10:24 PM, Kyle Sluder wrote: On Aug 8, 2009, at 8:14 PM, John Michael Zorko wrote: My question -- what is the correct way to release the UIImageView's animated

Re: [iPhone 3.0] correct way to release a UIImageView flip animation?

2009-08-09 Thread John Michael Zorko
Kyle et al, No problem -- here's my code. There is obviously something i'm not getting, so any help is truly appreciated. First, my view controller has a showAnimation method that is called to play the currently loaded animation: - (void)showAnimation { // only play the animation if