• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Toplevel Objects in NIB files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Toplevel Objects in NIB files
      • From: Greg Titus <email@hidden>
    • Re: Toplevel Objects in NIB files
      • From: Vince DeMarco <email@hidden>
References: 
 >Re: Toplevel Objects in NIB files (From: Vince DeMarco <email@hidden>)

  • Prev by Date: Re: HELP!!! Memory Leak I can't find in (BOOL)application:(NSApplication *)sender openFile:
  • Next by Date: copyPath command doesn't copy as the Finder. Help!
  • Previous by thread: Re: Toplevel Objects in NIB files
  • Next by thread: Re: Toplevel Objects in NIB files
  • Index(es):
    • Date
    • Thread