Have you ever used lisp Drag/Drop event handler code?

Started by owenwengerd, June 22, 2012, 02:17:11 PM

Previous topic - Next topic

owenwengerd

We are discussing changes to drag/drop handling in another thread. If you use drag and drop event handlers in your code, some of the proposed changes could break your code. Please reply here so I can get some idea how many of you are affected. Note that the changes would only affect custom (AutoLISP based) handlers, not the built-in default OpenDCL handlers.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

Hello,

I've used Drag'nDrop between listviews and trees many times in the past. I've never used the OpenDCL built-in functionality: I defined own event handler function for DragBegin, DragOver and Dropped every time. I've checked my part of the code from my prevoius employer and found over 50 places where any change could cause side-effects. Many Dropped events are very long.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

honkinberry

Perhaps another thought, is to add another Method?  DragnDropFromSelf.

In my case, I just have a TreeList control, and I want users to be able to reorganize things.
They may want to move "Joe Smith Residence" under a new group of "Residential Projects".  Or they may wish to copy one of the files from under "Joe Smith Residence" to a new project.
There's several file copy and database updates that need to occur, so it has to have a custom event, and it has to have a confirmation, "Are you sure you wish to {move/copy} the selected files?".

As such, for passed arguments, it wouldn't need ProjectName, FormName, ControlName.  It would just need SourceKey, TargetKey, DragType.  If the default drag behavior of the node disappearing after a Move operation is still going to fire after, it would be nice if the return value could control this.

I would offer that the overriding theme of a DragDropComplete event, is along the lines of, "A user has completed a drag and drop operation.  Here is what they dragged, where they dropped it, and in what matter.  Now it is up to you to effect that drop operation as necessary, or abort entirely."

--J