Re: myLoop: getting subject of messages in Mail.app
Re: myLoop: getting subject of messages in Mail.app
- Subject: Re: myLoop: getting subject of messages in Mail.app
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 03 Mar 2003 18:22:46 -0800
On 3/3/03 4:17 PM, "John Delacour" <email@hidden> wrote:
>
At 7:48 pm -0400 3/3/03, Bill Briggs wrote:
>
>
>> There are cases where a get is absolutely required if you want to
>
>> accomplish something in a single Applescript statement.
>
>
>
> In this case it's required because the scripting implementation
>
> isn't according to Hoyle. Which is what JD is trying to convince you
>
> of.
>
>
Yes, and I've given plenty of examples.
>
>
I can also give you examples of non-Apple developers who don't get
>
things right all the time, but as Bill says, these are aberrations.
>
When BareBones get things wrong, they admit it promptly and fix it in
>
an update, and the same goes almost certainly for Microsoft, though I
>
happen not to use their applications much. Paul Berkowitz will
>
confirm this I'm sure. Even good old Eudora talks proper Applescript
>
as she was spoke about 15 years ago in most quarters.
Well, for once I won't try to defend Entourage. There are just a few places
in Entourage (and OE before it) where the explicit 'get' or an evaluation by
variable is needed. These are all properties of the application, defined in
the 'application' entry in Standard Suite. The most notorious of these are:
set currMsg to item 1 of (get current messages)
-- needed to specify a message run by a rule or selected in a folder
set theObject to item 1 of (get selection)
-- needed to specify any selected object: contact, event, task message,
etc.
There aren't many others (I think maybe 2 or 3). And the developers do not
respond defensively or try to say it's correct. It has been acknowledged
openly as a bug, but one so deep and so difficult to fix that it's not
likely to be fixed any time soon. It applies only to these few application
properties, and nowhere else: you just have to learn those. (There are a
number of other apps that have the same problem with application
properties.) I believe that "PowerPlant" which they used to program the
application caused this way back when. It's unfortunate. But the other
several hundred or so properties of other classes in Entourage do not have
this problem. As JD and Bill B. have both said, it would be a pretty sorry
state if you needed to coerce an evaluation of every property by 'get'.
Yes, I too wish Apple would hire Cal to teach all the application
programmers how the syntax of AppleScript is meant to work. The "Cocoa"
thing is genuine, since Cocoa has some sort of automatic implementation of
AppleScript which is meant to make it easy for application developers to add
scriptability, replacing the 'aevt' of Carbon apps. And that's supposed to
make AppleScript more prevalent, which I guess it does, in its flawed way.
That's where these flaws lie, and where they need to be fixed by people who
actually know how AppleScript is supposed to work. For those of us used to
working with well-scripted 3rd-party apps devised by programmers who learned
how to do it when Apple showed the way - you invented it, for goodness' sake
- trying to wade through the contorted syntax of the OS X Apple apps is a
very frustrating and saddening experience. I agree with JD that the
programmers need to go to AppleScript school as taught by someone who
_really knows_ AppleScript.
--
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.