Re: Proper Way to "Unload" a Loaded Nib w/Bindings
Re: Proper Way to "Unload" a Loaded Nib w/Bindings
- Subject: Re: Proper Way to "Unload" a Loaded Nib w/Bindings
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 27 Mar 2007 11:51:22 -0700
On 3/27/07, James Bucanek <email@hidden> wrote:
If you know what your top-level objects are, send one release to each when you're done with the nib. (Remember that if you have release-on-close set for the window, the NSWindow will release itself.)
>Is there sample code for dynamically "unloading" a nib, especially without
>needing to know precisely what outlets are connected and what bindings
>exist. Basically what NSWindowController seems to do.
If you have an arbitrary or unknown set of top-level objects, do what
NSWindowController does: Use loadNibFile:externalNameTable:withZone:
Personally I would look at using NSNib and the functionality it
provides to load and instantiate nibs, in particular
instantiateNibWithOwner:topLevelObjects:. It is simpler to use. Note
NSNib is a 10.3 and later API.
-Shawn
_______________________________________________
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