Hi,

I think you might be making this harder than it needs to be because you are expecting the File's Owner of application's main nib file (usually MainMenu.nib) to require a lot of wiring up. Generally, it doesn't.

File's Owner is used to link object from one nib to another. Since your main nib is loaded at application start, and is generally not receiving messages from objects in other nibs, its File's Owner does not normally need to do much.

File's Owner becomes important when you have more than 1 nib. You will generally give it connections to the objects in its own nib that need to be controlled from outside. It should also have the signatures of any delegate methods, etc. that are needed for the nib objects to receive their messages from the outside objects.

Now, when you need the objects in your second nib, you will load the nib and pass in as the owner: an already instantiated object. This object will need to have all of the same types of outlets as the second nib's File's Owner, and it should implement whatever methods the File's Owner has listed.

However, this object will not actually be wired up to the File's Owner object in IB. It will become the File's Owner and be wired up programatically when the nib is loaded with this instance object as the owner. It will take over the role of File's Owner and be assigned all of the connections of the File's Owner for the loaded nib.

You should view the File's Owner object in IB as a place holder or a template. If you consider it a template, then it describes what the class that will take its place at run should do.

I hope the above explanation is helpful. It is my understanding of the how/why of File's Owner. It may be slightly off conceptually, but practically this understanding has served me well.

Cheers,
Jason
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to