• 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: one file's owner for multiple nib files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: one file's owner for multiple nib files


  • Subject: Re: one file's owner for multiple nib files
  • From: James Bucanek <email@hidden>
  • Date: Thu, 8 Jun 2006 13:24:31 -0700

Karim Morsy wrote on Thursday, June 8, 2006:
>if  a single instance is the files owner for multiple nib files it
>gets sent awakeFromNib each time one of the nibs is loaded.
>how can I determine in awakeFromNib which nib file this method was
>called for ?

As far as I know, you can't. The awakeFromNib message carries no contextual information.

However, it should be implied since it's probably your code that's loading on of the "other" NIBs, so you should be able to tell your object which NIB is about to be loaded prior to loading it.

The ideal solution, of course, would be an awakeFromNib handler that didn't need to know and would perform the correct initialization or do nothing as appropriate. Stateless handlers are always preferable, when possible.

--
James Bucanek
 _______________________________________________
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: 
 >one file's owner for multiple nib files (From: Karim Morsy <email@hidden>)

  • Prev by Date: Re: my class initialize is being called multiple times
  • Next by Date: Re: Re: my class initialize is being called multiple times
  • Previous by thread: one file's owner for multiple nib files
  • Next by thread: NSKeyedUnarchiver Exception, No Idea
  • Index(es):
    • Date
    • Thread