Droplet app with AppleEvent

Zax zax at tripoy.com
Thu Aug 10 06:53:49 EDT 2006


Well Mark,

It's the same: I only hear the beep if my app is already launched :(

> Maybe, the answer dialog is not available yet. What happens if you
> try the following in the mainstack of a standalone?
> 
> on appleEvent
>    beep
> end appleEvent
> 
> If you don't hear a beep, it looks (sounds) like a bug. I don't
> remember seeing this bug in later versions, you might want to
> download a trial version and try building your application with the
> latest version.

>> I would like my app made with Revolution 2.51 to react like a  droplet
>> when
>> dropping files or folders on the app icon.
>> I set "****" as file type and it's ok: dropping something on my app  icon
>> launches my app.
>> 
>> For testing purpose, I wrote this code in my main stack:
>> 
>> on appleEvent eClass,eID,eSender
>>   request appleEvent data
>>   answer eClass & return & "id =" && eID & return & "sender =" &&  eSender
>> &
>> return & "data =" && quote & it & quote
>>   pass appleEvent
>> end appleEvent
>> 
>> Everything is OK when I drop something onto the app icon *and* my  app is
>> *already opened*. In this case, "it" contains needed data.
>> But when I drop something onto the app icon *and* my app is *not  opened*,
>> then my app is launched but no AppleEvent is sended :(
>> Maybe because the app is not loaded, so it can't receive the  AppleEvent?
>> 
>> So, can somebody help me? A droplet must work even the app is not
>> launched,
>> otherwise it's not really a droplet! Do I have to add something in my
>> "openstack" handler? Or maybe add a "startup" handler with some  special
>> code
>> in it?

-- 
Zax 





More information about the use-livecode mailing list