FROM : Tomas Franzén
DATE : Mon Jun 02 23:09:26 2008
Hi,
I'm trying to figure out the best way to implement a scenario where
there's a table where the user can drag rows to reorder (the easy
part) but also drop them outside of the table to remove items with a
poof. The way we do it now is to use slideBack:NO and implement
draggedImage:endedAt:operation: and checking for NSDragOperationNone
and determining if the cursor was outside of the table view. And if
so, do the poof. This sorta-kinda works, but has some downsides. The
drag image never slides back. This is fine when there's a poof, but
not when the drag was ended with NSDragOperationNone inside of the
table. Also, this poofs if the user presses the escape key, since that
also sends NSDragOperationNone, which is horrible.
This way just feels like a dirty hack. There must be a better way. How
have you implemented it in your own apps?
Thanks!
Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/
DATE : Mon Jun 02 23:09:26 2008
Hi,
I'm trying to figure out the best way to implement a scenario where
there's a table where the user can drag rows to reorder (the easy
part) but also drop them outside of the table to remove items with a
poof. The way we do it now is to use slideBack:NO and implement
draggedImage:endedAt:operation: and checking for NSDragOperationNone
and determining if the cursor was outside of the table view. And if
so, do the poof. This sorta-kinda works, but has some downsides. The
drag image never slides back. This is fine when there's a poof, but
not when the drag was ended with NSDragOperationNone inside of the
table. Also, this poofs if the user presses the escape key, since that
also sends NSDragOperationNone, which is horrible.
This way just feels like a dirty hack. There must be a better way. How
have you implemented it in your own apps?
Thanks!
Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/
| Related mails | Author | Date |
|---|---|---|
| Tomas Franzén | Jun 2, 23:09 | |
| Graham Cox | Jun 3, 01:36 | |
| Graham Cox | Jun 3, 02:26 | |
| Uli Kusterer | Jun 3, 09:54 | |
| Graham Cox | Jun 3, 13:49 |






Cocoa mail archive

