Mailing Lists: Apple Mailing Lists

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

Bindings over IBOutlets for popup content?



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:
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.