Re: Xcode 4 editor scripting - help!
Re: Xcode 4 editor scripting - help!
- Subject: Re: Xcode 4 editor scripting - help!
- From: Matt Neuburg <email@hidden>
- Date: Sat, 03 Mar 2012 09:09:33 -0800
On Thu, 01 Mar 2012 10:57:53 +1000, Crispin Bennett <email@hidden> said:
>
>On 01/03/2012, at 7:02 AM, Jens Alfke wrote:
>
>> I do have a brain, but it never fully grokked the full complexity of the OSA or especially the Text event suite. To me AppleScript has always been more of a read-only language.
>
>Then there really is little hope for me. Every time I try to do something with AppleScript, I get lost in a morass of prepositions and give up. People do wonders with it, though.
This has gotten *way* off any conceivably relevant topic, but I can't resist pointing out that it is very important to distinguish between Apple events (the messaging mechanism, to which scriptable applications respond) and AppleScript (just a language, replaceable by other languages that deal just as well with Apple events). For example, I almost never use AppleScript for anything any more, even though (or perhaps because) I wrote a seminal book about it; I use Ruby, a much better language.
Thus, if an application is scriptable in the right way - if I can send it an Apple event and inquire about the selected text and the surrounding text, as I can for example with BBEdit or Microsoft Word or InDesign - I can analyze and munge that text with all the power and ease of Ruby. That's no problem.
The problem is that Xcode is *not* scriptable in the right way.
So, what would be nice would be if Apple would either make Xcode scriptable in the right way (i.e. it becomes willing to respond to Apple events inquiring about the selection and context, asking to insert text, etc.) or implement some *other* sort of interapplication communication mechanism in Xcode so that it can be scripted *somehow*.
That, in turn, raises the question of whether interapplication communication *itself* as we know it (i.e. via Apple events) is somehow doomed. Some people think it should be, in the sense Apple events are not a very good transport for the sorts of queries and answers that scriptability requires. Some people fear that it will be, as it is hard to see how interapplication communication of any sort can survive sandboxing.
m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden