Re: Toplevel Objects in NIB files
Re: Toplevel Objects in NIB files
- Subject: Re: Toplevel Objects in NIB files
- From: Nat! <email@hidden>
- Date: Thu, 4 Apr 2002 23:51:14 +0200
Am Mittwoch den, 3. April 2002, um 19:42, schrieb Vince DeMarco:
If you really want to do this, basically you do this here.
use the NSBundle method loadNibFile: externalNameTable:withZone:
[NSBundle loadNibFile:windowPath externalNameTable:[NSDictionary
dictionaryWithObjectsAndKeys:[self owner], @"NSOwner",
topLevelObjects, @"
NSTopLevelObjects", nil] withZone:[self zone]]
the NSMutableArray (topLevelObjects) will then get filled with all
of them.
vince
Works nicely. Testing this I found that no "NSNibConnector" (and
subclasses) objects show up. As nibtool hints "Connectors" appear
to be stored outside the object hierarchy, so they probably are
used in the NIB loading process to wire things up [and then they
are "forgotten" (?)]
Is there another key like "NSConnectors" to get the connectors
too ? Looking with strings through AppKit I didn't find a likely
candidate.
What I am also wondering is, who owns and releases the connectors?
If there is no "NSConnectors" key, the NSWindowController probably
can't do that. And the views can't either, because at best they
know about the connector as a delegate (and they don't
retain/release the delegate). The connectors themselves can't know
when the views "disappear". Is this a built in memory leak ?
Cheers
Nat!
------------------------------------------------------
Some people drink deep from the fountains of life, and
some just gargle. -- DLR
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.