Merci, Eric --

My "on dragLeave" handler is in the f1 script, so it's triggered when I drag the selectedtext out of the originating field. The handler gets triggered OK -- if I set a breakpoint the debugger opens as my drag leaves the field. For my current needs I will always be dragging text from f1 to f2, so I tried to do my modification in a dragLeave handler in f1, because putting it in the dragStart handler fails to work. As I said in my original post, if I try in a dragStart handler in f1 to set the dragActions and the allowableDragActions to "copy" and to modify the dragData, I don't get a drag-copy and I don't get my text modified, I just get the standard drag-move of the original text. On my system if I try to even just "get the dragData" in a dragStart handler it returns empty. And I can't seem to *set* the dragData (or the dragData["text"]) at all no matter what handler I put it in or in which script (f1 or f2).

Again, it's a very simple set-up, two fields, drag from f1 to f2, and the only script I have is the one given below, and whether I put it in a dragstart handler in f1 or in a dragleave handler in f1 or a dragEnter or dragDrop handler in f2, the text is never modified. And in dragstart, the dragdata is empty when I "get" it, never mind trying to modify it. At least in a dragLeave handler I can actually *get* the dragData. I can't *set* it at all, anywhere.

This seems like a bug (or bugs), but it's obviously only cropping up in my particular setup. Mac iBook G4, OSX 10.4.1, Studio 2.9 build 610. Anyone see something I'm overlooking?

Peter M. Brigham
[EMAIL PROTECTED]

On Apr 12, 2008, Eric Chatonet <[EMAIL PROTECTED]> wrote:

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

Reply via email to