> Hi Colin,
>
> Le 13 avr. 08 à 16:01, Colin Holgate a écrit :
>> On Apr 13, 2008, at 4:45 AM, Eric Chatonet wrote:
>>
>>> on dragStart
>>> set the dragdata["text"] to Transform(the selectedText) --
>>> end dragStart
>>> -----------------------
>>> function Transform pText
>>> return pText && "modified"
>>> end Transform
>>
>>
>> This too would fail if you include a pass dragStart. I suppose
>> though that you would never pass dragStart normally?
>
> AFAIK this works with or without 'pass dragStart' unless you have
> another dragStart handler in the hierarchy that redefines the dragdata
> ["text"] and put a mess :-)
> But usually you don't need to pass this message.
>
> Best regards from Paris,
> Eric Chatonet.
> ----------------------------------------------------------------
> Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
> Email: eric.c...@sosmartsoftware.com/
> ----------------------------------------------------------------
In my tests, the dragData is empty if you try to get it in a
dragstart handler. This seems to be confirmed by Mark's response to
your bug report -- he says "When you receive a dragStart message, the
'dragData' will be empty - so if
you want to mutate the data from a field (say) then you need to use 'the
selection' to get the currently selected text." Using the
selectedText (or the selection) is the workaround I'm using:
on dragStart
put the dragData["text"] into dd
set the dragData["text"] to the selectedtext && "hello"
end dragStart
-- this works for me. But if I add a "pass dragStart" --
on dragStart
put the dragData["text"] into dd
set the dragData["text"] to the selectedtext && "hello"
pass dragStart
end dragStart
then I get an untransformed drop. So passing the dragstart voids the
transformation.
Also, the dragAction property when set in the dragstart handler
doesn't appear to do anything. However, if I set the
allowabledragactions to either "move" or "copy" in a dragstart
handler, the appropriate copy or move is done -- *unless* I pass
dragstart, in which case the current allowabledragactions is ignored
and I get in all cases a move.
Eric, thanks for posting the bug report. There seem to be a lot of
aspects to the dragdata and dragging that are either buggy, or don't
work as I would expect, or are undocumented. I'm posting my
observations to the QCC.
Peter M. Brigham
pmb...@gmail.com_______________________________________________
use-revolution mailing list
use-rev...@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
I posted a report too, basically for the documentation error, and Mark
added some info that confirms your tests:
http://quality.runrev.com/qacenter/show_bug.cgi?id=6382
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com