How to create an application that opens when you drag a folder onto it?

Peter Reid preid at reidit.co.uk
Wed Sep 28 10:28:26 EDT 2016


I can make an app for the Mac that opens when the user drags & drops a file onto its icon using the following Apple Event handler:

on appleEvent pClass, pEventID, pSender
   if pClass is "aevt" then
      request appleEvent data
      put it into tFileName
      if pEventID is "odoc" then
         -- open file event - app is being used as a droplet:
         processFile tFileName
      end if
   end if
   pass appleEvent  
end appleEvent

However, I can't find the equivalent event ID for when the user drags & drops a folder instead of a file onto an app icon!  Can anyone tell me the event ID or alternative mechanism for handling folders?

Thanks.

Peter
--
Peter Reid
Loughborough, UK





More information about the use-livecode mailing list