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

This email sent to [EMAIL PROTECTED]

Reply via email to