Bonjour Peter,
DragLeave is sent when the mouse pointer moves out of an object
during a drag and drop: so if you enter a drop zone but don't move
out from it and re-enter it, dragleave will never be sent.
I don't think it's the right place to put your code in :-)
So, try it in a dragStart handler as I said: DragStart is the only
message that will be sent once only:
All other messages are sent repeatedly (dragMove) or according to the
user actions (DragEnter, DragLeave) so dragStart is the best place to
put your code in and not repeat it without reason.
Send me your test stack off-list if you wish: I'll have a look to
help you.
Le 12 avr. 08 à 16:17, Peter Brigham a écrit :
On Apr 11, 2008, Eric Chatonet <[EMAIL PROTECTED]>
wrote:
Hi Peter,
I just made the experiment by selecting a chunk of text in an
unlocked field and setting the dragData["text"] to a different value
in a dragStart handler.
When dropping it in Rev or in another application the result was the
one I expected, i.e. the text I had set by script.
Difficult to tell you what you probably miss without having more
details ;-)
Thanks for trying it out, Eric. So -- I made a new stack, no
scripts at all. Two fields, "f1" and "f2" -- in f1 is the text
"something here". The script of f1 consists only of a dragLeave
handler:
on dragLeave
set the allowableDragActions to "copy"
set the dragAction to "copy"
-- if I take the above two lines out then text is moved
-- instead of copied but still is not modified
put the dragData["text"] into dd
put " modified" after dd
set the dragData["text"] to dd
put the dragData["text"] into ddMod
-- breakpoint
pass dragLeave
end dragLeave
I select "something here" in f1 and drag to f2. I should get
"something here modified" dropped into f2, but I get "something
here". With the breakpoint, in the debugger I get dd = ddMod =
"something here". Setting the dragData is ignored.
Mac iBook G4, OSX 10.4.1, Studio 2.9 build 610
This is a bug, at least on my system, no? Unless there is something
in my settings I've overlooked... I'n not running Galaxy or any
other alternative IDE software. I see no similar bugs reported so
far in the QCC.
And, BTW, in a *dragstart* handler, (1) setting the dragAction (and/
or allowableDragActions) doesn't work for me, and (2) the dragData
property returns empty -- is that normal? Seems odd. In the above
dragLeave handler both these things work as expected. If this is
abnormal behavior, is it somehow connected with my inability to set
the dragData at any point?
????
Peter M. Brigham
[EMAIL PROTECTED]
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution