Re: NSTableView drag and drop too smart for its own good
Re: NSTableView drag and drop too smart for its own good
- Subject: Re: NSTableView drag and drop too smart for its own good
- From: Corbin Dunn <email@hidden>
- Date: Wed, 13 Sep 2006 12:49:16 -0700
The problem is that it seems like NSTableView sees itself as the
source of the drag, so it won't allow drops at the position of the
original dragged row (thinking it's just a move of a row within
itself). It doesn't even seem to call -tableView: validateDrop:
proposedRow: proposedDropOperation: on my data source when the drag
is over the original row position (even though in my case, the table
has different data so it would make sense to drop it there).
This is a bug which will be fixed.
Is there an easy way to work around this or am I stuck re-
implementing NSTableView's drag and drop in a subclass to get this
to work?
An easy, cool, workaround: use two tableviews (they can have the same
datasource/delegate). When switching sources, use NSViewAnimation to
fade one table out and the other table in. Cool! (and avoids your
issue). For abstraction, you can keep a pointer to the "active
tableview" or something like that and switch back and forth.
-corbin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden