• 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: Custom app class and NSApplicationLoad
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom app class and NSApplicationLoad


  • Subject: Re: Custom app class and NSApplicationLoad
  • From: glenn andreas <email@hidden>
  • Date: Thu, 9 Nov 2006 13:08:46 -0600


On Nov 9, 2006, at 12:53 PM, David Catmull wrote:

NSApplicationLoad seems to be ignoring the NSPrincipalClass item in my app's plist, and just creating an instance of NSApplication instead of my subclass. If I call [MyAppSubclass sharedApplication] first, then NSApplicationLoad thinks it doesn't need to do anything, and my Cocoa-in-Carbon windows don't work right.

So is there a way to get NSApplicationLoad to use a custom app class?

The reason I'm subclassing NSApplication is so I can add my own key paths for bindings.

Not that this solves your specific problem (NSPrincipalClass), but to address your underlying issue (key paths) you can just use the app's delegate, and then just prepend "delegate." to your key paths.


This works great for cases like multiple NIBs (where you've only got your app delegate declared in the main menu nib, for example, but want some other globally bound value in another NIB).



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Custom app class and NSApplicationLoad (From: David Catmull <email@hidden>)

  • Prev by Date: Re: Pass paramters to application started from login items (in user prefs)
  • Next by Date: Re: Pass paramters to application started from login items (in user prefs)
  • Previous by thread: Custom app class and NSApplicationLoad
  • Next by thread: Re: Custom app class and NSApplicationLoad
  • Index(es):
    • Date
    • Thread