Hello, It looks like this is your answer:
http://lists.apple.com/archives/cocoa-dev/2008/Apr/msg02276.html It sounds like the object is the file's owner of the nibs that you're loading using loadNibNamed:. Is this correct? Also check out: http://www.google.com/search?client=safari&rls=en-us&q=awakefromnib+called+twice&ie=UTF-8&oe=UTF-8 David On Wed, Mar 11, 2009 at 12:19 PM, Stuart Malin <stu...@zhameesha.com> wrote: > In my MainMenu Nib I have a controller object. The code for that controller > object has an -awakeFromNib method. That method invokes NSBundle's > -loadNibNamed: method to load yet another Nib. Doing this leads to repeating > invocations of the -awakeFromNib method of the initial controller (it is the > same object, not new ones). > > Now, that leads me to think: just add an ivar flag that is set before > invoking -loadNibNamed: so that a subsequent invocation of the controller's > -awakeFromNib can ignore the secondary call. So I do this... and everything > *appears* to work. But... I am concerned this may not be safe. Perhaps Nib > loading is not re-entrant, even in the same thread. Question: Is what I am > doing safe, dangerous, or does that not matter and my architecture/approach > is not a good practice? > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/davekeck%40gmail.com > > This email sent to davek...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com