FROM : Julien Palmas
DATE : Thu Apr 21 11:05:52 2005
I have a document based app with only one window per document.
This application can open a large variety of different documents, so I
decided to create several nib files, each containing the corresponding
view for the document.
When opening the document, I check its kind and load the according nib.
This helps reduce the application footprint and the load time, as I
don't open all the nibs ...
Still, This is my first document based app and I have issues about the
files owner. For each different nib, I created a subclass of NSObject
and set it as the file owner when I load the nib with [NSBundle
loadNibNamed:] This owner has several IBOultets, but not for every
single element in the nib.
The thing is that when I release the owner, I don't think the nib is
released as well, as my nib owner is not a sub-class of
NSWindowController. But as I only have one window (that already has its
NSWindowController), I didn't wanted to use a sub-class of
NSWindowController for the nib owner.
How could I do to make sure my nib is released ?
Some "good-coding" advices would be greatly appreciated.
Julien
DATE : Thu Apr 21 11:05:52 2005
I have a document based app with only one window per document.
This application can open a large variety of different documents, so I
decided to create several nib files, each containing the corresponding
view for the document.
When opening the document, I check its kind and load the according nib.
This helps reduce the application footprint and the load time, as I
don't open all the nibs ...
Still, This is my first document based app and I have issues about the
files owner. For each different nib, I created a subclass of NSObject
and set it as the file owner when I load the nib with [NSBundle
loadNibNamed:] This owner has several IBOultets, but not for every
single element in the nib.
The thing is that when I release the owner, I don't think the nib is
released as well, as my nib owner is not a sub-class of
NSWindowController. But as I only have one window (that already has its
NSWindowController), I didn't wanted to use a sub-class of
NSWindowController for the nib owner.
How could I do to make sure my nib is released ?
Some "good-coding" advices would be greatly appreciated.
Julien
| Related mails | Author | Date |
|---|---|---|
| Julien Palmas | Apr 21, 11:05 | |
| Dirk van Oosterbos… | Apr 21, 13:49 | |
| Julien Palmas | Apr 22, 02:26 | |
| Ondra Cada | Apr 22, 03:35 | |
| Julien Palmas | Apr 22, 08:44 | |
| j o a r | Apr 22, 09:22 | |
| Ondra Cada | Apr 22, 12:30 |






Cocoa mail archive

