Re: Cocoa UI
Re: Cocoa UI
- Subject: Re: Cocoa UI
- From: Erik Buck <email@hidden>
- Date: Wed, 13 Dec 2006 10:52:19 -0800 (PST)
- Cocoa nibs are just data files (OK folders full of data files). They are even available in an XML flavor.
- Cocoa nibs do NOT have to be stored in an application bundle. They can be stored anywhere. It is trivial to write an application that prompts the user to select a nib file within the file system and then loads the selected nib file.
- The standard File's Owner and responder chain connection will work no matter where the nib file is stored.
- Bindings will also work fine no matter where the nib file is stored
The catch is that the loading application needs to contain code for all of the objects in the loaded nib file or else errors will be generated during the load. This is not a problem for AppKit standard objects because any loading application can be assumed to contain them.
It might be best (as others have said) to provide a plug-in system. Some plug-ins might consist entirely of new nib files, but by using NSBundle or similar and loading plug-ins properly, the plug-ins can also contain compiled code. For example, a plug-in might contain a nib file that uses some custom objects. The same plug-in can contained the compiled code that implements the custom objects. Now, when the main application loads the plug-in, even the custom objects will work.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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