Presetting instance variables when nib-loading
Presetting instance variables when nib-loading
- Subject: Presetting instance variables when nib-loading
- From: Gwynne <email@hidden>
- Date: Fri, 26 Mar 2004 03:07:38 -0500
I have a (non-document-based) application whose main controller needs
to have an instance variable set before -awakeFromNib is called. Right
now I'm doing this by implementing -initWithCoder:, setting the
variable, and returning self without doing anything else. It seems to
work, but I'd like to know if this is the best way. The variable is not
an outlet and can't be set from IB.
Alternatively, is there any way to prevent -awakeFromNib from being
called on the controller being awoken as the File Owner in a secondary
nib? The idea here is to prevent -awakeFromNib from being executed more
than once, without having to implement an entire separate controller
class for the one outlet and one method the sheet I'm loading needs. I
could put the sheet in the main nib, but Apple keeps telling us not to
put more than one window into one nib. Thoughts?
-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web:
http://musicimage.plasticchicken.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.