[Adium-devl] [15911]: Uniqueified applescriptrunners

Peter Hosey boredzo at gmail.com
Sun Apr 30 21:47:25 UTC 2006


On Apr 30, 2006, at 14:16:48, Evan Schoenberg wrote:
> On Apr 30, 2006, at 5:06 PM, Peter Hosey wrote:
>> But if multiple Adiums are running, they will each run their own AR.
> I don't believe so.
>
> Adium #2 wants to use an AR.  It posts RespondIfReady and receives  
> IsReady.  It therefore doesn't launch its own.
> At some point in the future, Adium #1 quits, and its AR quits with  
> it.  That AR posts DidQuit.  Adium #2 receives this, so it knows  
> that if at some point in the future it wants to run an applescript,  
> it will need to launch an AR.

But if they try to run a script at the same time, they will launch  
two ARs at the same time.

What we could do is sign up for the IsReady notification at launch,  
then run the run loop for 0.1 seconds or so to see if one came in. If  
so, terminate. If not, post our own IsReady notification and keep  
running.
__________________________________
\ Peter Hosey / boredzo at gmail.com
PGP public key ID: 7AB26BAD (since 2006-01-01)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20060430/045cd427/attachment.sig>


More information about the devel mailing list