• 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
Re: NSTableColumn unbindable when NSSegmentedCell is used?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableColumn unbindable when NSSegmentedCell is used?


  • Subject: Re: NSTableColumn unbindable when NSSegmentedCell is used?
  • From: "Mike Laurence" <email@hidden>
  • Date: Thu, 30 Oct 2008 22:38:16 -0500

Thanks for the suggestion, but I need to be able to set the contents of the
cell (e.g., the labels of the different buttons) before the selected
index/tag/label is of any use.

With a data source, the cell received a 'setObjectValue' call with an array
of items, each corresponding to a different button, so it was easy to
iterate over said array and assign the buttons in one quick gesture.

With bindings, every other type of cell (?) has a 'value' binding which
corresponds to the same setObjectValue method, which is called automatically
when the data is populated into my underlying array. But NSSegmentedCell
lacks it completely - perhaps I have to subclass it and add my own bindings?
I haven't done that before, but I guess I'll give it a shot.

If anyone has had any experience with the NSSegmentedCell in a bindings
fashion, please let me know what steps you took to get it working.

Thanks!

Regards,
Mike


On Wed, Oct 29, 2008 at 7:39 PM, Dave Fernandes
<email@hidden>wrote:

> If you google "NSSegmentedCell bindings", the first search result is
> http://developer.apple.com/documentation/Cocoa/Reference/
> CocoaBindingsRef/BindingsText/NSSegmentedCell.html
>
> I'm guessing you want selectedIndex or selectedLabel or selectedTag.
>
>
>
> On Oct 29, 2008, at 2:23 AM, Mike Laurence wrote:
>
>  Hello,
>>
>> I'm migrating a non-binding version of an NSTableView over to a binded
>> version. In the non-binding version (using a data source), one of my table
>> columns used a subclass of NSSegmentedCell, and I merely overrode
>> setObjectValue in order to capture the data and set the number of
>> segments,
>> their labels, etc.
>>
>> In the binded version, I have successfully converted all of the text field
>> cells - each NSTableColumn has a 'value' binding, which I set to
>> [controller.arrangedObjects.key], and I'm able to see all of my text data
>> just fine. However, the NSTableColumn containing my NSSegmentedCell
>> subclass
>> mysteriously lacks a 'value' binding, and I'm unable to fathom how to set
>> the data inside of it.
>>
>> Can anyone point me to the correct way to bind my arrangedObjects to those
>> NSSegmentedCells?
>>
>> Thanks very much!
>>
>> Regards,
>> Mike Laurence
>> _______________________________________________
>>
>> 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:
>> 40utoronto.ca
>>
>> This email sent to email@hidden
>>
>
>
_______________________________________________

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: NSTableColumn unbindable when NSSegmentedCell is used?
      • From: Quincey Morris <email@hidden>
References: 
 >NSTableColumn unbindable when NSSegmentedCell is used? (From: "Mike Laurence" <email@hidden>)
 >Re: NSTableColumn unbindable when NSSegmentedCell is used? (From: Dave Fernandes <email@hidden>)

  • Prev by Date: Re: Porting from Windows to Mac
  • Next by Date: Re: Debugging NSDistributedNotificationCenter
  • Previous by thread: Re: NSTableColumn unbindable when NSSegmentedCell is used?
  • Next by thread: Re: NSTableColumn unbindable when NSSegmentedCell is used?
  • Index(es):
    • Date
    • Thread