Help with dragdata["private"] needed

Klaus Major klaus at major-k.de
Wed Sep 3 09:05:13 EDT 2008


Hi all,

today I encountered a situation where I could need dragdata["private].
But it looks like I cannot get it to work, maybe I am not using it  
correctly,
the docs are very sparse on this.

For testing purposes I created a stack with only two buttons in it:
"d_source" and "d_target"

Script of "d_source":
on dragstart
   set the allowabledragactions to "move,copy,link"
   ## May not be necessary, but just to be sure

   set the dragimage to 3049
   ## Works

   set the dragdata["private"] to "A private string"
   put the dragdata
   ## Nothing gets "put" into msg?
end dragstart


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
   ## No answer

   answer the dragdata["private"]
   ## No answer
end dragdrop

## This works, so there is something being dragged!?
on dragenter
   set the hilite of me to true
end dragenter


Is there anything that I am overlooking?
Any hints appreciated.

Thanks in advance!


Best

Klaus Major
klaus at major-k.de
http://www.major-k.de





More information about the use-livecode mailing list