Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: sometimes, true = false !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sometimes, true = false !




Le 21 sept. 2009 à 17:17, Axel Luttgens a écrit :

Le 21 sept. 2009 à 15:53, Yvan KOENIG a écrit :

Trying to help a user, I wrote a script wich gave odd results.

I dropped  a lot of things and reduced it to this bare one:

[...]

The result is really foolish:

"liste1 : 2, 3
liste2 : 2, 3
liste3 : 1, 4, 5, 6, 7, 8, 9, 10"

liste1 claims that visible of records 2 & 3 is true
but
liste2 claims that visible of records 2 & 3 is false.
Happily, liste3 gives the correct list.

So, at this time, I'm forced to use a loop when a whose clause was the theorical best choice.

Any idea to get a correct result with whose ?

Hello Yvan,

With the same database, could you show the result of

tell application "AppleWorks 6"
tell document 1
visible of records
end
end

then of

tell application "AppleWorks 6"
tell document 1
properties of records
end
end

?

The second returns a list of records of properties.
I must use a loop to isolate the visible items.

tell application "AppleWorks 6"
activate
tell document 1
set props to get properties of records
end tell
set liste to {}
repeat with r from 1 to count of props
if visible of item r of props is true then copy r to end of liste
end repeat
end tell
liste

Yvan KOENIG (VALLAURIS, France) lundi 21 septembre 2009 18:27:20


 _______________________________________________
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

References: 
 >sometimes, true = false ! (From: Yvan KOENIG <email@hidden>)
 >Re: sometimes, true = false ! (From: Axel Luttgens <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.