-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was thinking about the Perl/AppleScript issue the other day as I 
was writing my first AppleScript program in Studio.  (So far no luck, 
can't figure out how to make a droplet wake up when I drop a URL on 
it from IE.)

While you can certainly have Applescript run a Perl script on every 
action, that's painful and doesn't maintain any state.

It seems to me that someone should write an AppleScript program that 
takes a set of standard UI events, decomposes the objects, and then 
turns them in to SOAP calls.  In fact maybe the hooks already exist 
for translating Apple Events into SOAP (anyone know?).  Then you just 
need a Perl library for turning those into method calls.  To use a 
Perl program in this environment you write it as an event driven 
server.  When your application starts up, it starts the perl program. 
All communication thereon is via SOAP.  In that environment, writing 
a GUI Perl program is just a matter of loading a template that has 
all the Applescript code, and then editing your Perl program to take 
the events.  (Okay, if you want to send anything interesting back, 
you'll have to write some Applescript to take it and display it, but 
still, the guts can be in Perl.)

The nice thing about this approach is that writing the initial glue 
shouldn't be a big deal.  Handling every possible object is a lot of 
work, but it can be built incrementally.  Anytime someone needs to 
handle a new type of object they simply add the relevant Applescript 
and Perl code to the libraries.

Is any of this making sense?
- -- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED]

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Security 7.0.3

iQA/AwUBPEOEriZsPfdw+r2CEQKXyACg6eECtEEsbd0LYA85QZAGPZMV5wAAnA/i
AVD/2Q73/b8Zo3oF7yuGkVK8
=fcY0
-----END PGP SIGNATURE-----

Reply via email to