Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)



Hey Brendan,
Thanks for the idea. This sounds like a useful technique. Could you explain a little further to a new-to-Cocoa programmer how this is done? I suspect other newbie's on the list would benefit. Or if you can point to a doc that says it already that's great as well.

I went and looked at the FileOwner instance in the Nib file and it seems to be NSApplication and I can't seem to add outlets for it in the Classes view. Do I need to subclass NSApplication and then change the FileOwner class attribute to my subclass, and then I can create outlets, or is there a more elegant way.

Thanks in advance,
tyler


On Thursday, July 19, 2001, at 10:21 AM, Brendan Younger wrote:

NSBundle's -principalClass will probably get you what you want, but the more sane and popular way to do this is to have outlets connected to your File's Owner class and when you load the nib and specify a File's Owner, all those outlets will automatically be connected.

Brendan Younger
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java) (From: Brendan Younger <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.