Re: one file's owner for multiple nib files
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