Re: And another thing I don't quite understand... ;-)
Re: And another thing I don't quite understand... ;-)
- Subject: Re: And another thing I don't quite understand... ;-)
- From: John Hörnkvist <email@hidden>
- Date: Tue, 8 May 2001 17:14:57 +0200
On Tuesday, May 8, 2001, at 04:48 PM, Matt Ridley wrote:
return [NSArray arrayWithObjects:
NSToolbarCustomizeToolbarItemIdentifier,
[toolItems objectForKey:@"Sample"], nil];
This looks OK --- provided that toolItems really is a dictionary and it
has an item identifier for the key @"Sample".
I assume you're getting an exception; what does it look like, and where
does it happen?
NSArray* returnArray=nil;
NS_DURING
returnArray= [NSArray arrayWithObjects:
NSToolbarCustomizeToolbarItemIdentifier,
[toolItems objectForKey:@"Sample"], nil];
NS_HANDLER
NSLog(@"Oops; I got an exception when creating the array!");
[localException raise];
NS_ENDHANDLER;
return returnArray;
Typically when you have calls going to unexpected places, you've
released an object too early, and the memory has been reused by another
object. Turning on NSZombie can help debugging.
Regards,
John Hornkvist