Droplets and AppleEvents

Dave dave at looktowindward.com
Tue Feb 27 11:08:16 EST 2007


Hi,

I added an AppleEvent handler to the Main Window Stack and I now get  
the the AppleEvents ok. I had thought that the Splash Screen would  
always get the message. What is the action here? If the user drops a  
file into the Standalone Icon, where should the AppleEvent get sent?

One other thing, I want to give my App a Creator type of CR01, but I  
want to be able to Drop Movie Files into it. How do I go about  
setting this up in the Standalone settings dialog.

Thanks a lot
All the Best
Dave

------------------------------------------------------------------------ 
------------------------------------

Hi,

I have an application that is built into a standalone. If the app is  
launched by double-clicking it then I want to display a (prefs)  
window (whether the app is already running or not)  if the app is  
launched by dragging and dropping a file into the App's Icon, then I  
want to process the file(s).

I have my Standalone structured so that a Splash Screen is made into  
a Standalone and it calls other Stacks inside the App bundle. This  
all works fine. However, if I launch the app, let the Splash Screen  
Splash, then drag and drop a file onto the App Icon, the Icon  
Highlights as expected but I don't get the AppleEvent - ever. If in  
the secondary stack I press a button that simply has this script  
attached:

on mouseUp
answer "Hello World"
end mouseUp

I get the "Hello World" dialog then hit ok and then AppleEvents seem  
to get thru, e.g. I can drag and drop files onto the Apps Icon and  
the appleEvent handler below runs and I get the "odoc" event.

Here is the AppleEvent Script handler in the Stack Script of the  
Splash Screen:

------------------------------------------------------------------------ 
-----------------
--
--  appleEvent
--
------------------------------------------------------------------------ 
---------------
on appleEvent theClass,theID
   local myAppleEventData

   request appleEvent data

   put it into myAppleEventData
   answer "theClass: " & theClass & "  theID: " & theID & cr & "Data:  
" & myAppleEventData
   pass appleEvent
end appleEvent

Any ideas on how I can make this work correctly??

Thanks a lot
All the Best
Dave





_______________________________________________
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



More information about the use-livecode mailing list