• 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 not usable with binder of class NSTextValueBinder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableColumn not usable with binder of class NSTextValueBinder?


  • Subject: Re: NSTableColumn not usable with binder of class NSTextValueBinder?
  • From: Dave Dribin <email@hidden>
  • Date: Tue, 19 Aug 2008 17:47:15 -0500

On Aug 19, 2008, at 5:19 PM, Corbin Dunn wrote:
You can in IB3; just double click on the cell...then set the class.

It's not letting me set it to my custom cell. It just beeps (IB version 3.1, build 670). I think this is because the column is setup a text field cell, and it will only let me set the class to an NSTextFieldCell subclass. There's no plain NSCell in the Library from what I can find.


Otherwise, you have to manually set up your binding in code after you set the [tableColumn dataCell]. The binding is specific to the cell type. If you need a code example, I can dig one up.

Just tried that, too, and now I get the following error in the console (with -NSBindingDebugLogLevel 1):


Cocoa Bindings: Error accessing bound property value of object <NSTableColumn: 0x256ca0>: [<NSTableColumn 0x256ca0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key value.

Here's my code, which looks very similar to the ManualBindings sample code:

    [column bind:@"value"
        toObject:controller
     withKeyPath:@"arrangedObjects.whatever"
         options:nil];

Again, what's strange is if I change my cell's superclass to be NSTextFieldCell, this bind: call does not give an error and it all works. I also tried subclassing NSActionCell, and that works, too. Is my cell not implementing some method that bindings expects to be there? Something that is implemented in NSActionCell?

-Dave

_______________________________________________

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 not usable with binder of class NSTextValueBinder?
      • From: Dave Dribin <email@hidden>
    • Re: NSTableColumn not usable with binder of class NSTextValueBinder?
      • From: Corbin Dunn <email@hidden>
References: 
 >NSTableColumn not usable with binder of class NSTextValueBinder? (From: Dave Dribin <email@hidden>)
 >Re: NSTableColumn not usable with binder of class NSTextValueBinder? (From: Dave Dribin <email@hidden>)
 >Re: NSTableColumn not usable with binder of class NSTextValueBinder? (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Calling an object from a C function
  • Next by Date: Re: From JavaMail to Cocoa?
  • Previous by thread: Re: NSTableColumn not usable with binder of class NSTextValueBinder?
  • Next by thread: Re: NSTableColumn not usable with binder of class NSTextValueBinder?
  • Index(es):
    • Date
    • Thread