Hi all,

I've made an NSActionCell subclass for indicating the priority of an object, similar to the rating column in iTunes. The visual aspects of it are working fine, as well as displaying the correct priority for table rows that have a priority value set.

The problem is setting the new priority when the user clicks on the column. I've tried two approaches:

1) Setting the target of the cell to self, and in the action message set the objectValue of the cell to the desired priority (which I have no problem determining from the location of the mouse click). Somehow that does not affect the bound NSManagedObject at all.

2) Using the mouse tracking approach that I copied from:
http://code.google.com/p/fskit/source/browse/trunk/FSKit/Sample%20Apps/FSSearchDemo/SFHFRatingCell.m?r=37

This didn't work either (it also sets the objectValue of the cell)...

I guess I am missing something fairly obvious, but I've been searching through the docs for it, and I can't find it. Any help would be greatly appreciated...

In IB I bound the table column to the arrangedObjects.priority of the array controller of the table. I have a coordinating controller that initializes and sets the custom cell on the column in it's awakeFromNib.

Reading the binding reference for NSTableColumn seems to indicate to me that the cell's objectValue is what gets bound to the managed object's property, so it seems what I am doing should just work, and it just does not.

TIA,
F


_______________________________________________

Cocoa-dev mailing list ([email protected])

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