I see you are talking about the onDrop callback of Droppables, which
is documented at http://github.com/madrobby/scriptaculous/wikis/droppables

I was reacting to the documentation at 
http://github.com/madrobby/scriptaculous/wikis/draggable
in which the example shows a new draggable being created followed by
the following lines...

// then destroy it when you don't need it anymore
mydrag.destroy();

... which caused me to think that - oh new draggables should be
cleaned up when we are done with them. Now, for me, if I create an
object through an API, and cleanup is expected, then I expect the API
to provide a cleanup method. This way I know internal structures
within the API are properly updated. If I remove the draggable
directly from the dom then internal Draggables structures will
reference an element that no longer exists.

To me, it looks like the method provided by the API, 'destroy',
requires information (the draggable handle) which is not conveniently
available - hence my suggestion for an API cleanup method that can
work with information that is conveniently available at drop time -
namely the element.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to