Extracting class of items from list
Extracting class of items from list
- Subject: Extracting class of items from list
- From: Andrew Oliver <email@hidden>
- Date: Tue, 02 Aug 2005 10:02:52 -0700
(10.4.2/AppleScript 1.10)
I'm not convinced this is working as expected (or, at least, as far as *I*
expect), but I'm also not (yet) convinced it's a bug. Can someone explain
this action to me one way or another?
Given a list containing mixed classes:
set myList to {"word", 123, {"a", "b"}, true}
I know it's possible to extract certain classes of items from the list:
every text of myList
--> {"word"}
every integer of myList
--> {123}
every list of myList
--> { {"a", "b"} }
However when you ask for:
every text item of myList
You get:
--> {"word", 123, {"a", "b"}, true}
I can't help thinking that's wrong.
My first expectations were the same as 'every text of myList', and then
every character of the list (as if the list was coerced to a string then
divided up using TIDs), but neither of those are the case.
What's the justification for returning the entire list when asking for text
items of that list?
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden