Drag and Drop

Peter Haworth pete at mollysrevenge.com
Tue Feb 8 19:25:02 EST 2011


Thanks Richard.  Despite what I said in my earlier email about Thiery's fix for the snapback, you are correct that it doesn't fix it.  Somehow or other, the snapback occasionally doesn't happen, at least in my stack, but most of the time it does.  I think I'll just live with it until 4.6.

I've pretty much got all this working now.  I ended using images of the controls to be dragged not the controls themselves.  Each image has a custom property with the ID of the real control that is to be placed onto the destination stack.  I found I had to do that because all the controls have custom behaviors which were sometimes being triggered when I clicked on the to begin the drag.

Pete Haworth

On Feb 8, 2011, at 3:58 PM, Richard Gaskin wrote:

> Peter Haworth wrote:
>> One other possible change- should there be a 'reset templatebutton' at then end of the dragEnd handler?
> 
> Good catch.  Yes, ideally there should be, or perhaps even better to store the properties of the templateButton into a temporary array, and then reset it to those values before exiting (just in case any other script may be relying on custom settings).
> 
> --
> Richard Gaskin
> Fourth World
> LiveCode training and consulting: http://www.fourthworld.com
> Webzine for LiveCode developers: http://www.LiveCodeJournal.com
> LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list