Re: Property of a record
Re: Property of a record
- Subject: Re: Property of a record
- From: Nigel Garvey <email@hidden>
- Date: Wed, 18 May 2011 22:21:41 +0100
Jim Brandt wrote on Tue, 17 May 2011 14:31:37 -0500:
>Thanks Nigel. That gets what I need.
>
>So, am I to expect problems with this when I move this script to
>Leopard or Snow Leopard?
I don't think so, as long as you use one of the suggestions which work
for you now. The first one's probably the best:
set {text:RowText} to it
It's the only one which unambiguously says you want the value of 'it's
'text' property, whereas the other two return the first value of a
certain class.
In Snow Leopard (without the benefit of TextCommands), your orignal line…
set RowText to it's text -- text of the row
… returns a _list_ of text. It's because of the ambiguity surrounding
the meaning of 'text' in this context. You have in mind a record
property labelled 'text'; the compiler assumes the reference means every
text value in the list or record.
NG
>
>On May 17, 2011, at 2:01 PM, Nigel Garvey wrote:
>
>> These work on my Tiger machine:
>>
>> set {text:RowText} to it
>>
>> set RowText to item 1 of (its every Unicode Text)
>>
>> set RowText to first Unicode text of (it as list)
_______________________________________________
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