Re: Input for Upcoming Book
Re: Input for Upcoming Book
- Subject: Re: Input for Upcoming Book
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 17 Jan 2003 21:19:35 -0800
On 1/17/03 7:53 PM, "Steven Angier" <email@hidden> wrote:
>
AppleScript Studio has some severe limitations -- the largest of which (to
>
me) is the inability for the various scripts to share data. This effectively
>
forces the entire project into one main project file, and the inevitable
>
gigantic conditional statements make the event handlers cumbersome to work
>
with.
Of course they can share data. There are examples to show how to do it,
where you load the other scripts as script objects. Bill Cheeseman published
a tutorial for this kind of set-up, which is excellent. What you can't do is
save persistent script properties between script runs. But the user default
methods are easy and work perfectly. You just have to learn them, which is
not hard, although a bit peculiar.
>
>
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. For example, in FaceSpan you could just refer to "window item
>
3 of window 1", whereas in AppleScript Studio you have to refer to "button 3
>
of view of tab view item 3 of tab view 1 of window 1". FaceSpan would
>
resolve the reference. Studio can't.
That's a nuisance, but it goes with the OO nature of the language. At least
they've cut out the need for 'scroll view' in v1.2. It's also a bit simpler
if you refer to the names of the objects (which can often all be same if
there's only 1 of everything, or descriptive otherwise), and then it doesn't
seem so tedious and mysterious as all those numbers which you'd have to look
up on a chart. There have been intimations that there will be more coercions
coming to cut out some levels of 'begat'.
>
>
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).
Oh dear!
--
Paul Berkowitz
_______________________________________________
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.