I have two views that are different layouts of the same UI loaded by a NSViewController. Now lets say that I have an IBOutlet to an NSButton* button1 that is present in both views. I want to swap one view out for the other and when I do so have the IBOutlet for button1 swap to the button1 defined in the second view in another NIB.

So for example, the viewcontroller inits with View A. button1 is assigned to the NSButton in View A. I then swap that view to View B which also have a button1. View B is in a different NIB. So I want button1 to now point to View B. Is this something that can be done automatically?

One way I was thinking of doing this was as follows:

IBOutlet NSButton* button1_viewA;
IBOutlet NSButton* button1_viewB;
IBOutlet NSButton* button1;

and then point button1 to whatever is the currently displayed view. That's fine and doable, but before I do that I wanted to know if there was a better way, a more manageable way.

Thanks!

Alex Kac - President and Founder
Web Information Solutions, Inc.

"If at first you don't succeed, skydiving is not for you."
-- Francis Roberts





_______________________________________________

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