Re: Filter reference form question
Re: Filter reference form question
- Subject: Re: Filter reference form question
- From: Brennan <email@hidden>
- Date: Thu, 18 Dec 2003 11:07:27 +0100
On Wed, 17 Dec 2003 11:19:34 -0800, Christopher Nebel
<email@hidden> wrote:
>
Assuming you meant 'width' and not 'color', yes.
Duh! Yes. (I had color before, then changed it to width, but not
everywhere).
>
> every foo whose width is less than its length
>
This does seem to be impossible, but not for the
>
reason you suppose. AppleScript parses and sends out
>
the request as you desire -- both "width" and "length"
>
are specified as properties of "the object being
>
examined".
>
>
Unfortunately, no application I've checked handles
>
this correctly: the Finder simply errors, and Cocoa
>
applications (I tried TextEdit and Mail) return all
>
elements or none, as if the test were always true or
>
always false. (AppleScript built-in types don't
>
support "whose" in the first place, so the problem is
>
moot -- yes, fixing that is on my to-do list.)
>
>
Strictly speaking, this is a bug in the application,
>
though arguably the system should provide more help
>
than it does. I suggest you file a bug against any
>
application that doesn't handle this correctly.
You mention three Apple applications. I am hitting this issue hard in a
fourth: QuickTime Player. Are these issues already logged as bugs in all
these apps? I can file bug reports if it will help, but it sounds like I
will have to file a *lot* of bug reports (one for each scriptable Apple
app??? There are dozens!) if I want some kind of consistent behavior from
this more-or-less core feature. <dismay/>
The thought of approaching third party developers with this issue is also
slightly daunting.
It strikes me that this must be at least partly documentation issue if
Apple's own developers can't get it right. I imagine this is because it
hasn't been mentioned much. (It's not in ASLG, for example).
Shouldn't the Applescript docs mention this issue specifically - perhaps
with sample code snippets - so that developers might be more aware? My
guess is that developers don't implement this properly because they don't
think they need to, and/or they don't know how because they don't have
good examples to follow.
In addition, the application frameworks supplied with Xcode (those which
offer embryonic 'out of the box' Applescript support) ought to get the
required attention so that they handle this issue properly. This would
help a great deal.
When it turns out that MS Word does the right thing, I am slightly amazed.
(I'm less amazed, but certainly comforted, about TexEdit Plus and Smile,
because their developers are famously conscientious about this kind of
thing).
So it's good to have it confirmed as a bug by Chris, although slightly
depressing that Apple don't lead the way with it. (We've heard this
before, right?)
I think this issue is *big* PITA because I often need to use these kinds
of filters, and then end up having to make (slow, tedious) repeat loops
instead. I'd also like to hear about any other apps which handle it
correctly.
Brennan
_______________________________________________
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.