Help with dragdata["private"] needed
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Wed Sep 3 10:07:09 EDT 2008
Bonjour Klaus,
I think that you are a bit confused with D&D syntax ;-)
In the script of "d_target" you should have something like:
on dragEnter
if the dragData["private"] = "A private string" then set the
dragAction to "Copy" -- or "Move"
else set the dragAction to "None"
end dragEnter
on dragDrop
put "Accepted"
end dragDrop
You set the dragAction on dragEnter and dragdrop will occur according
to the dragAction set: none or...
BTW put the dragData without specifying a key will always return the
dragdata["text"]
Le 3 sept. 08 à 15:53, Klaus Major a écrit :
> Hi trevor,
>
>> On Sep 3, 2008, at 9:05 AM, Klaus Major wrote:
>>
>> Hey Klaus,
>>
>>> set the dragdata["private"] to "A private string"
>>> put the dragdata
>>> ## Nothing gets "put" into msg?
>>> end dragstart
>>
>> What does put the dragData["private"] show? If you don't specify a
>> key then the dragData returns the dragData["text"]
>
> OK, I see, changed it to
> ...
> set the dragdata["private"] to "A private string"
> put the dragdata["private"]
> ## puts the correct string!
>
> So far, so good...
>
>>> Script of "d_target" (one of a lot of variations):
>>> on dragdrop
>>> set the hilite of me to false
>>> ## Works, see dragenter
>>>
>>> if the dragdata = "private" then
>>> answer "Privat!"
>>> end if
>>
>> To check for a particular type you need to check the keys of the
>> dragData. So check if "private" is among the lines of the keys of
>> the dragData.
>
> Aha, but after I changed this (again) to the most obvious (which
> was my first try):
>
> Script of "d_target":
> on dragdrop
> set the hilite of me to false
> put the dragdata["private"]
> ## Nothing gets put?!
> end dragdrop
>
> And exactly that is my problem :-)
>
>> Regards,
>>
>> --
>> Trevor DeVore
>> Blue Mango Learning Systems
>> ScreenSteps: http://www.screensteps.com
>> Developer Resources: http://revolution.bluemangolearning.com
>
> Best
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list