Re: Filter reference form question
Re: Filter reference form question
- Subject: Re: Filter reference form question
- From: Michael Terry <email@hidden>
- Date: Mon, 19 Apr 2004 23:53:01 -0700
On Apr 19, 2004, at 10:52 PM, Michael Terry wrote:
Are there any applications that support this seemingly valid
construction? I couldn't get Finder or OmniOutliner to do it.
tell application "Finder"
get every file of item (choose folder) where my test(its name)
end tell
on test(testName)
return testName is "whatever"
end test
For that matter, even this fails in Finder:
tell application "Finder"
get every file of item (choose folder) where true
end tell
... even though any Boolean expression should be valid.
Also, consider the following code:
tell application "Finder"
get every file of item (choose folder) where my test(its name) is
"hello"
end tell
on test(testName)
display dialog testName
return testName is "whatever"
end test
Why does the display dialog show "Finder" rather than some file name?
If one writes:
tell application "Finder"
get every file of item (choose folder) where its name is "hello"
end tell
... there's no way 'its name' can be construed to mean "Finder".
Shouldn't 'it' mean the same thing throughout the Boolean expression
following the 'where'?
Mike
_______________________________________________
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.