What is Macintosh equivalent of relaunch handler?
Martin Koob
mkoob at rogers.com
Thu Mar 28 17:43:50 EDT 2019
Here is probably a better link to the Apple Documentation for the LiveCode
documentation.
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html#//apple_ref/doc/uid/20001239-1117769
It has a higher level explanation events and talks about standard events
that all applications received:
open application (or launch)
reopen
open (or open documents)
print (or print documents)
open contents
quit (or quit application)
Martin
Martin Koob via use-livecode wrote
> Sorry there was a typo in the second link. It should be:
>
> https://developer.apple.com/documentation/coreservices/appleevent
>
> It picked up a period at the end.
>
> Martin Koob
>
>
> Martin Koob via use-livecode wrote
>> I checked the LiveCode dictionary in my hot off the press PDF version to
>> see
>> if there was more info on what data request AppleEvent data could give.
>> I
>> found a reference to
>>
>> For more information about Apple events, see Apple Computer's technical
>> documentation, Inside Macintosh: Interapplication Communication, located
>> at
>> http://developer.apple.com/documentation/mac/IAC/IAC-2.html.
>>
>> Once I saw 'Inside Macintosh' I suspected this is a dead link. I found
>> that
>> is already noted in bugzilla -
>> https://quality.livecode.com/show_bug.cgi?id=20022
>>
>> I did a quick search on and found this in Apple's documentation
>> https://developer.apple.com/documentation/coreservices/appleevent.
>> Should
>> this be the link for that dictionary entry?
>>
>>
>> Martin Koob
>>
>>
>> Bob Sneidar via use-livecode wrote
>>> Hi Bill,
>>>
>>>> I want my application to be able to catch parameters sent to it via
>>>> the command line.
>>>>
>>>> The relaunch handler does that for Windows applications and also
>>>> doesn’t open another instance of the application. You are correct that
>>>> Mac apps run in a single instance by default and that is the behavior
>>>> I want.
>>>>
>>>> I don’t want to open a document…I want to do something with the
>>>> command line parameters sent to my app.
>>>
>>> The simple answer is that there isn't an equivalent.
>>>
>>> The relaunch mechanism on Windows was added to make it easy to add
>>> single-instance like behavior on Windows (just as macOS has).
>>>
>>> However remember that macOS has the AppleEvent system for making it easy
>>> to do inter-process communication, so on Mac you could use that.
>>>
>>> i.e. Make the command-line tool use AppleScript (either by do ... as
>>> applescript) or the 'send to program' syntax to send apple events to
>>> instruct the main app.
>>>
>>> Warmest Regards,
>>>
>>> Mark.
>>>
>>> --
>>> Mark Waddingham ~
>>
>>> mark@
>>
>>> ~ http://www.livecode.com/
>>> LiveCode: Everyone can create apps
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>
>>> use-livecode at .runrev
>>
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>>
>>
>>
>> --
>> Sent from:
>> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>>
>> _______________________________________________
>> use-livecode mailing list
>
>> use-livecode at .runrev
>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at .runrev
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
More information about the use-livecode
mailing list