Drag and Drop Problem

Dave dave at looktowindward.com
Fri Mar 2 08:54:34 EST 2007


Hi,

I have the following "drag" handlers in the Script of a field. It all  
works - mostly. The problem is that sometimes the field gets left  
with a blue border. If I pick up a file in the Finder and move it  
onto the border turns blue (most of the time) if I then move it out  
of the field it goes back to normal (most of the time). However  
sometimes it just doesn't receive the dragEnter/dragLeave message.  
This happens running under the IDE and as a Standalone.

Is this anything else I need to do in order to get this to work  
reliably? I am using an Intel Mac Pro, MacOS X 10.4.8 with god knows  
how much RAM and  1 Terabyte of  Hard Disk Space! Lucky me! lol

Thanks a lot
All the Best
Dave

------------------------------------------------------------------------ 
-
--
--  dragStart
--
------------------------------------------------------------------------ 
-
on dragStart
end dragStart


------------------------------------------------------------------------ 
-
--
--  dragEnter
--
------------------------------------------------------------------------ 
-
on dragEnter
   set the borderColor of me to "blue"
   set the threeD of me to false
   set the acceptDrop to true
end dragEnter



------------------------------------------------------------------------ 
-
--
--  dragLeave
--
------------------------------------------------------------------------ 
-
on dragLeave
   set the borderColor of me to empty
   set the threeD of me to true
   set the acceptDrop to false
end dragLeave


----------------------------------------------------------------------
--
--  dragDrop
--
------------------------------------------------------------------------ 
-
on dragDrop
   local myDropData
   local myMessageID
   local myMessageKind


   --
   --  Grab the Data
   --
   put the dragData["files"] into myDropData
   if myDropData = empty then
     beep
     pass dragDrop
   end if

   --
   --  Send the Add to Job Queue Message
   --
   put "HFPAJobControlMessageID"into myMessageID
   put "HFPAJobQueueAdd"into myMessageKind
   get ISMAppUtilsEncodeAndPutMessage 
(myMessageID,myMessageKind,"Volatile","String",myDropData & cr)

   --
   --  Tidy up and Return
   --
   dragLeave

   pass dragDrop
end dragDrop






More information about the use-livecode mailing list