Re: A Syntax Question
Re: A Syntax Question
- Subject: Re: A Syntax Question
- From: Shane Stanley <email@hidden>
- Date: Wed, 09 Jul 2014 12:46:48 +1000
On 9 Jul 2014, at 3:11 am, Paul Berkowitz <email@hidden> wrote:
This is all perfectly normal AppleScript behavior and has always been so.
Mind you, this thread reinforces the point that it's unexpected, which, especially given AS's intended audience, suggests it was not a very good design choice. This is compounded by the way invisible coercion kicks in to make it appear to work the way people expect in some cases. Presumably it was done in than name of making one operator work with multiple classes, rather than, say, separate containment operators for each class.
Probably the safest thing to do is to avoid the operator altogether for lists, and use a simple handler instead:
on listContainsItem(theList, theItem) return theList contains {theItem} end listContainsItem |
_______________________________________________
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