Re: What's the best way to access top level objects loaded from a nib?
Re: What's the best way to access top level objects loaded from a nib?
- Subject: Re: What's the best way to access top level objects loaded from a nib?
- From: Graham Cox <email@hidden>
- Date: Mon, 16 Mar 2009 22:27:26 +1100
On 16/03/2009, at 10:12 PM, Ken Tozier wrote:
I tried adding an IBOutlet to the class that loads the nib, but
these objects are meant to be generic building blocks and setting
filesOwner to a specific class doesn't make any sense.
Suggestion: why not make Files Owner be some sort of factory class
that just dishes out views or the parts you want on demand? It could
also take care of duplicating views on behalf of its clients if it
needs to (given that you need to this by archiving/dearchiving).
Internally the factory would use IBOutlets but you could hide all that
from its clients.
I've used this approach with success.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden