Hi Jenny > Is it possible to link multiple NSTextFields to one outlet? I have > three views - one of A items, one of B items, and one of both A and B > items. So the text boxes in the A view also exists in the A&B view, > and the value needs to be able to appear in both, though not at the > same time. I have a method that calculates values and sets the textbox > values (or label values, same concept) using an outlet, but I don't > want it to set 2 outlets, I want it to just set 1. > > Is this possible using outlets or bindings?? > > Or is there a way I can place two NSViews into one NSView so there's > only one copy of everything?
You can certainly bind any number of UI objects to a single property of an object. Specifying an IBOutlet is only necessary if you want to create a connection and can only be connected to one thing at a time. Simply specify a property and bind the NSTextFields to that. @interface MyClass { } @property (nonatomic, retain) NSString *aTextValue; @end @implementation MyClass @synthesize aTextValue; @end With the later versions of the compiler, you don't even need to specify an ivar, it will be created for you. Joanna -- Joanna Carter Carter Consulting _______________________________________________ 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 arch...@mail-archive.com