• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: And another thing I don't quite understand... ;-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: And another thing I don't quite understand... ;-)
      • From: Matt Ridley <email@hidden>
References: 
 >And another thing I don't quite understand... ;-) (From: Matt Ridley <email@hidden>)

  • Prev by Date: And another thing I don't quite understand... ;-)
  • Next by Date: Re: And another thing I don't quite understand... ;-)
  • Previous by thread: And another thing I don't quite understand... ;-)
  • Next by thread: Re: And another thing I don't quite understand... ;-)
  • Index(es):
    • Date
    • Thread