Problem with "whose clause" resolution
Problem with "whose clause" resolution
- Subject: Problem with "whose clause" resolution
- From: Scott Thompson <email@hidden>
- Date: Thu, 4 May 2006 12:02:55 -0500
No response on this issue from applescript-implementors so I'll ask here
Our code does not contain any explicit code for handling whose
clauses. Instead, we rely on the Cocoa behavior built into the
operating system. I'm seeing some unexpected behavior in resolving a
"whose clause" that I just don't understand.
The offending script contains :
tell document 1
set centralTopic to the central topic
every topic whose parent is centralTopic
end tell
In evaluating this script, my code is asked for the central topic,
and the list of every topic of document 1 as I would expect. Each
topic is then asked for it's parent (as I would expect). So far as I
can tell, this works fine.
I then get a series of scriptingIsEqualTo: calls to which my code
seems to respond appropriately.
In short, I'm seeing all the calls I would expect, and I seem to be
returning good results for all of them.
calls like:
every topic
or
parent of every topic
seem to give correct results.
Given the structure:
Central Topic
Topic 1
Topic 2
Topic 3
I would expect the script to return {Topic 1, Topic 2, Topic 3}
Instead, what I'm getting back is { Central Topic, Topic 2, Topic 3 }
I can't see any good reason for this to fail short of a bug in the
whose clause resolution provided by Cocoa. I guess my question is
"Is there a known bug that might be causing this?".
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden