OSX drag & drop rev application?

J. Landman Gay jacque at hyperactivesw.com
Wed Jul 8 12:32:14 EDT 2009


Alex Shaw wrote:
> Hi
> 
> No problems getting the global variable $1 working on a runrev windows 
> standalone to determine what data file was dropped on the application or 
> double-clicked to launch the standalone but how do you do this on OSX?
> 
> Discovered if the data file is really a renamed stack set to be opened 
> by the osx compiled rev standalone then that works ok (stack just runs 
> and no need for $1) but what if you do not want to use a rev stack file 
> for your data file container or want to activate the rev app by dropping 
> a data file onto the standalone application icon sitting on your dock?

Use an AppleEvent handler for Macs:

on appleEvent pClass, pID
   if pClass is "aevt" and pID is "odoc" then
     -- the file path is in the appleEvent data
     request appleEvent data
     put it into tFilePath
     -- open the file here
   else
     pass appleEvent
   end if
end appleEvent

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list