• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSSlider and arrangedObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSlider and arrangedObjects


  • Subject: NSSlider and arrangedObjects
  • From: Tobias Wood <email@hidden>
  • Date: Thu, 19 Jan 2012 11:03:26 +0000

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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSSlider and arrangedObjects
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: NSTask terminates when NSApplication exits (Scott Ribe)
  • Next by Date: Re: Cocoa-dev Digest, Vol 9, Issue 28
  • Previous by thread: Re: NSTask terminates when NSApplication exits (Scott Ribe)
  • Next by thread: Re: NSSlider and arrangedObjects
  • Index(es):
    • Date
    • Thread