Re: Accessing objects in a nib file
Re: Accessing objects in a nib file
- Subject: Re: Accessing objects in a nib file
- From: j o a r <email@hidden>
- Date: Wed, 2 Jul 2003 19:52:51 +0200
You get hold of the objects in a nib file by loading the nib file
(using the methods from NSBundle: "loadNibFileNamed:owner:" - part of
the additions to NSBundle found in AppKit).
The objects will be hooked up to the "outlets" (ie. instance variables)
of the "files owner" of the nib file - that could be "you" (ie. the
object loading the nib file).
If you are loading a nib file without being the nib file owner, you can
still get hold of the objects in the nib file using the
"externalNameTable:" functionality of the nib loading mechanism (again,
see NSBundle). Use the list archives to find out more about this, since
it's a very non-standard thing to do. List archives found here:
<
http://cocoa.mamasam.com/>
j o a r
On Wednesday, Jul 2, 2003, at 19:13 Europe/Stockholm, Daniel Aarno
wrote:
Well, maybe I wasn't clear. I want to access the object from within an
obj-C source file. The instance in the code is not represented in IB.
The nib file is in the applications main bundle if it makes a
difference.
_______________________________________________
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.