FROM : Clark Cox
DATE : Thu Jan 10 22:20:56 2008
On Jan 10, 2008 8:58 AM, Bill Bumgarner <<email_removed>> wrote:
> On Jan 10, 2008, at 1:27 AM, Dent John wrote:
> >> Sorry, couldn't resist te pun. I'm a noob but I heard about this
> >> when Xcode's build settings aren't set properly.
> >
> > Yes – I guess I have to admit to falling victim to the RFTM properly
> > suggestion. Which I admit that I hadn't done recently. Even so, I do
> > think that making NIB objects collectable is quite funny. After all,
> > they are there in the NIB for a good reason!! Still, it is not ours
> > to reason why. :-)
>
> It would have required new API to support some kind of top level
> collection returned by the NIB that, ultimately, would have been a
> waste of memory.
>
> The easiest solution for non-mainmenu NIBs is to create outlets on
> your File's Owner for each of the top level objects (of which there
> are typically few).
Or to load the nib via NSNib, which has the method:
- (BOOL)instantiateNibWithOwner:(id)owner topLevelObjects:(NSArray
**)topLevelObjects;
for just this reason. Pass in a pointer to a variable as the second
parameter, and it will be set to an NSArray containing all such
top-level objects.
--
Clark S. Cox III
<email_removed>
DATE : Thu Jan 10 22:20:56 2008
On Jan 10, 2008 8:58 AM, Bill Bumgarner <<email_removed>> wrote:
> On Jan 10, 2008, at 1:27 AM, Dent John wrote:
> >> Sorry, couldn't resist te pun. I'm a noob but I heard about this
> >> when Xcode's build settings aren't set properly.
> >
> > Yes – I guess I have to admit to falling victim to the RFTM properly
> > suggestion. Which I admit that I hadn't done recently. Even so, I do
> > think that making NIB objects collectable is quite funny. After all,
> > they are there in the NIB for a good reason!! Still, it is not ours
> > to reason why. :-)
>
> It would have required new API to support some kind of top level
> collection returned by the NIB that, ultimately, would have been a
> waste of memory.
>
> The easiest solution for non-mainmenu NIBs is to create outlets on
> your File's Owner for each of the top level objects (of which there
> are typically few).
Or to load the nib via NSNib, which has the method:
- (BOOL)instantiateNibWithOwner:(id)owner topLevelObjects:(NSArray
**)topLevelObjects;
for just this reason. Pass in a pointer to a variable as the second
parameter, and it will be set to an NSArray containing all such
top-level objects.
--
Clark S. Cox III
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Dent John | Jan 9, 11:45 | |
| Jonathon Mah | Jan 9, 12:57 | |
| Dent John | Jan 9, 14:24 | |
| Clark S. Cox III | Jan 9, 14:54 | |
| Jonathan Dann | Jan 9, 15:40 | |
| mmalc crawford | Jan 9, 16:55 | |
| Dent John | Jan 10, 10:27 | |
| Bill Bumgarner | Jan 10, 17:58 | |
| Clark Cox | Jan 10, 22:20 | |
| Dent John | Jan 13, 11:47 |






Cocoa mail archive

