Mailing Lists: Apple Mailing Lists

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

Binding across different Nib



Hi,
I have recently discovered the bind features and I have found it's a great
technology. It really saves a lot of time. I have added a NSObjectController
to the xib file, connected it to MYClass and my test worked well.

Now I have a MyDocument.xib file containing the controller and the window of
my document. And I have a different MainMenu.xib file containing the
Inspector window and InspectorObject and the inspectorController. I wouldn't
put the Inspector window in the MyDocument xib file because I should have
only one Inspector window and several documents windows open.

So now, how to connect the NSObjectController to the active document?
Actually I have put the inspectorController in the MainMenu.xib, and coded
[inspectorController setContent:self];
in the windowControllerDidLoadNib in my MyDocument class. When I create a
new document, it works. But I really need to put this statement in something
like "onActivateDocument" method.

Any idea?
And should I really put the inspectorController in the MainMenu.xib file or
in the MyDocument.xib file?


Thank you
--
LL


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to 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.