Dropping into One of Several Columns
Dropping into One of Several Columns
- Subject: Dropping into One of Several Columns
- From: Mike Rossetti <email@hidden>
- Date: Wed, 27 Feb 2008 22:13:32 -0700
I've got an NSTableView with multiple text column and I'd like to be
able to control where a drop of some text goes based on in which
column the user is making the drop. Since the validateDrop: member
function of the table's data source does not provide a 'proposed
column', I'm going to guess that I'm going to have to (in -
[NSTableDataSource
tableView:validateDrop:proposedRow:proposedDropOperation:]) grab the
mouse position and figure out the column over which the user is
hovering, validate the drop destination, and cache the column number
for later use (in -[NSTableDataSource
tableView:acceptDrop:row:dropOperation:]). It also looks like I'll
have to do my own highlighting if I want only the specific column to
respond to the drop.
Before I launch into what looks like a bit of code, I would appreciate
it if someone could confirm this approach or else tell me I'm missing
something rather obvious.
Thanks,
Mike
_______________________________________________
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