Hi everyone,
I am attempting to bind an NSSlider to a property of every object in an 
NSArrayController, rather than just the current selection. There are other 
properties that are bound to the selection, but this particular one I want to 
change for everything, regardless. The array managed by the controller is 
initially empty when the program starts.

Binding the NSSlider's value to the NSArrayController's 
"arrangedObjects.propertyName" causes my program to get a SIGABRT on opening, 
with the following uncaught exception:
"Cannot create double from object ( ) of class __NSArray0"

I assume this is to do with the empty array. I have tried binding the 
NSSlider's enable to "arrangedObjects.@count" and "arrangedObjects.canRemove". 
Neither fixes the problem. If I bind the value to "selection.propertyName", the 
enabling/disabling works as expected (i.e. the slider is greyed out until the 
array has at least one entry). Hence I am confused.

Thanks in advance if you can help,
Toby
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to