Re: "where its" vs "whose"
Re: "where its" vs "whose"
- Subject: Re: "where its" vs "whose"
- From: Shane Stanley <email@hidden>
- Date: Tue, 30 Aug 2016 12:07:34 +1000
On 30 Aug 2016, at 11:08 AM, Jim Underwood <email@hidden> wrote:
So, the guideline to myself is: - Use "whose" with properties
- Use "whose its" with elements
Can anyone verify or refute?
But you're using it with properties in all cases. Axel's point is the clue:
In the case of Safari, "document" is the name of a class, the name of an application’s elements and the name of a window’s property (all of these items having seemingly the same underlying code 'docu')
So when you use:
tell application "Safari" every window where document is not missing value end tell
The compiler isn't smart enough to work out which meaning of document you intend, and the test if performs is "document ≠ missing value", where "document" is the document class. Adding the "its" gives the compiler the necessary hint to test "every window's document ≠ missing value".
So the best answer is probably that "its" is required whenever there might be ambiguity.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden