• 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: NSApplication subclass crashes on 10.3 with Xcode 3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplication subclass crashes on 10.3 with Xcode 3


  • Subject: Re: NSApplication subclass crashes on 10.3 with Xcode 3
  • From: Jamie Hardt <email@hidden>
  • Date: Wed, 17 Sep 2008 09:13:57 -0700

Hello-

I don't thin you can call dictionaryWithObject: without having an autorelease pool set up, and initialize might be getting called before autorelease pool for the main loop is getting setup. Try replacing dictionaryWithObject: with a standard alloc-init sequence.

Or, do the initialization in the app delegate in the applicationDidFinishLaunching: message. That's the best solution.

On Sep 16, 2008, at 8:18 PM, Kevin Wojniak wrote:
@implementation MyApp
+ (void)initialize
{
NSLog(@"MyApp initialize!");
NSDictionary *dict = [NSDictionary dictionaryWithObject:@"object" forKey:@"key"];
NSLog(@"dict: %@", dict);
}
@end

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSApplication subclass crashes on 10.3 with Xcode 3
      • From: "Michael Ash" <email@hidden>
    • Re: NSApplication subclass crashes on 10.3 with Xcode 3
      • From: Kevin Wojniak <email@hidden>
References: 
 >NSApplication subclass crashes on 10.3 with Xcode 3 (From: Kevin Wojniak <email@hidden>)

  • Prev by Date: Re: NSMutableString question
  • Next by Date: Re: Multi DB Library
  • Previous by thread: NSApplication subclass crashes on 10.3 with Xcode 3
  • Next by thread: Re: NSApplication subclass crashes on 10.3 with Xcode 3
  • Index(es):
    • Date
    • Thread