Ok in the long time period it took for this e-mail to finally show up
here (3 days!?) I figured out how to do this and I'll post the code
which will hopefully help other people.
First you need to add a couple of additional methods to your table
datasource so we can easily turn drag and drop off from the tableview:
dragAndDrop is just a BOOL declared in the header file.
Then you need to subclass NSTableView if you've not already done so.
It's useful to be able to set the column we wish to disable the normal
dragging behaviour for using its identifier (usually specified through
IB). Here are the accessors for this variable, you'll want
draggingDisabledColumn initialised in initWithFrame and declared in the
header.
Right that's only part of the problem fixed however. For some reason
[super mouseDown: theEvent] doesn't properly send clicks through to the
cells, but drags go through fine. To fix this we need to add a method
to our subclassed cell:
// Deal with the click however you need to here, for example in a
slider cell you can use the mouse x
// coordinate to set the floatValue.
// Dragging won't work unless you still make the call to the super
class...
return [super trackMouse: theEvent inRect: cellFrame ofView:
controlView untilMouseUp: untilMouseUp];
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden