Re: Why does this filter expression not work? Anyone have an idea?
Re: Why does this filter expression not work? Anyone have an idea?
- Subject: Re: Why does this filter expression not work? Anyone have an idea?
- From: Michael Johnston <email@hidden>
- Date: Wed, 2 Mar 2005 18:28:42 +0100
1 - I see that you are testing "name of color", but you are setting
the "color" property: you are sure it should not be "set name of color
of ..."
Yes, I forgot to mention. This is another oddity in
quark-applescript-data-coercion-hell that took me X amount of
unbudgeted time to figure out. And the set color works perfectly fine
if I copy-paste the reference returned by the filter expression. And it
works perfectly fine with the first filter expression. And setting
other properties besides color display the same bug in the second
filter expression.
2 - I know some cases where an expressions with "every ... whose" does
not work as expected only because the application meets a failure
while evaluating the test. For instance, suppose that for some reason
"name of color of picture box 14 of layout space 1 etc." returns an
error, maybe that would be enough for your command not to work.
But the filter expression with no set seems to work. It returns a list
with proper references to objects. I can, for example, (and have tried
this) loop through the returned list setting the color of each item
separately. At first this was causing me some panic, because in my real
application I need to set the color of cells of table boxes and there
are many cells in many table boxes in many pages in many documents and
using the loop was going to add substantial processing time. But I've
discovered putting it in a script object speeds it up considerably,
almost as fast as using the filter expression.
Cheers,
Michael Johnston
Planetactive
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden