Bindings over IBOutlets for popup content?
Bindings over IBOutlets for popup content?
- Subject: Bindings over IBOutlets for popup content?
- From: Scott Ellsworth <email@hidden>
- Date: Wed, 8 Jun 2005 23:02:00 -0700
Hi, all.
Should one run a binding across something hooked up via an IBOutlet?
In my NSView subclass, I have an NSArray with the valid view sizes.
(@"Small", @"Medium", and @"Large", for what it's worth.)
In the NSView subclass, I have an accessor method (- NSArray *
possibleWidgetSizes;) to return that array, and accessors widgetSize
and setWidgetSize to set the value.
I have an IBOutlet named view in my NSWindowController subclass
connected to the NSView instance in the window. These are in a
separate nib from any other window.
I have an array controller bound to view.possibleWidgetSizes, and a
popupButton whose content points at the array controllers arranged
objects. The selectedValue is bound to view.widgetSize.
Of late, this has stopped working, and I believe it is because the
IBOutlet is not connected at the time the menu is populated. Thus,
the menu shows no content items.
I could probably move the array/value to the window controller,
rather than the NSView subclass, but I am curious. Is running a
binding across something connected via an IBOutlet forbidden?
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden