Re: Input for Upcoming Book
Re: Input for Upcoming Book
- Subject: Re: Input for Upcoming Book
- From: Charles Arthur <email@hidden>
- Date: Mon, 20 Jan 2003 17:16:26 +0000
At 2:53 pm +1100 on 18/1/2003, Steven Angier <email@hidden> wrote:
(re Applescript Studio's ability to call Cocoa methods from Applescripts)
>
Why not just use Cocoa? Apple has made that much easier than using
>
AppleScript Studio. That's what Project Builder and Interface Builder were
>
really purpose-built for (visually connecting inlets and outlets etc.) --
>
and there are plenty of books available for Cocoa development.
'Cos although I've tried some, including getting and reading a book on
Cocoa development, I can't get my head around it. I don't have the time to
devote. Applescript though I can grok, sufficient unto my neds.
>
Personally, I don't see any value in having this type of preference file.
>
For a long time, our preference files have been either text-based
>
label-value pairs (the Unix way), or stored AppleScript objects -- the ideal
>
data medium for AppleScript applications. Both of these formats still work
>
and are "real" enough -- both easily editable. They just aren't Apple's
>
flavour of the month.
I'm looking forward to Steve Angier's next book: "Why XML is a flash in the
pan."
re Applescript Studio
>
The second major problem (as I see it) is the inability to simply reference
>
a window item by name, index or id -- in order to target a window item, your
>
code must traverse the entire window object hierarchy until you reach the
>
target object.
Dealt with by someone else, but I'll echo - if you name the objects in the
interface then you can reference them almost directly.
>
The third problem is the abandonment of AppleScript conventions such as
>
error messages/error codes in favour of Cocoa conventions (e.g.
>
"NSReceiveEvaluationScriptError:4" instead of "Object not found -1728" or
>
similar).
Neither is very helpful on their face, and actually you do learn what
AStudio is yelping about. One particular error means "I couldn't find that
button", another means "Can't find that value". One learns. Sure, more
expressive would be better. But no AStudio would be worse.
Oh, and a bonus point about Applescript Studio: apps built with it are
themselves Applescriptable, right through to the interface object level.
You can open their dictionaries and everything.
Meanwhile, relevant to Charles's request about what people would want in a
book, I'd say that understanding Apple's new GUI scripting would surely be
a priority. Especially because recordability of so many applications (which
is how lots of people, myself included) got their start in Ascript, is
missing. Having some scripts that would work out of the box once GUI
scripting is core to the OS would be a great way to learn. Or at least,
wouldn't suck.
Charles
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.