Re: Creating a list of numbers from a Contacts group
Re: Creating a list of numbers from a Contacts group
- Subject: Re: Creating a list of numbers from a Contacts group
- From: Nigel Garvey <email@hidden>
- Date: Fri, 06 Jan 2017 14:09:27 +0000
Shane Stanley wrote on Fri, 06 Jan 2017 23:30:14 +1100:
>On 6 Jan 2017, at 9:43 pm, Nigel Garvey <email@hidden> wrote:
>>
>> There's no such method as arrayByRemovingObject: It
>> rightly causes an error in Script Editor. And yet it works as I'd
>> expected in Script Debugger, which is a cause for concern. :\
>
>As everyone has found at some stage, you can have a terminology
conflict if
>the editor you are using defines an AppleScript term. The word
"language"
>is an example: you can't use it as variable name in Script Editor
because
>it's in SE's dictionary.
>
>A similar thing can happen with classes. Developers can extend classes
by
>adding extra methods, using things called categories and class
extensions.
>They are very common because of the convenience they offer. And once
they
>have been loaded by the application, their methods are all accessible to
>ASObjC code hosted by the app.
>
>The arrayByRemovingObject: method is a fairly classic example,
simplifying
>a common job.
It's still not nice. I made the mistake because, vaguely remembering
that it was possible to remove objects from arrays, _I_, the scripter,
found it more convenient to try the likely method name than to launch
Xcode again and hunt through its documentation to find out if the method
actually existed. What I tried not only didn't error but did exactly
what was required. It wasn't until I happened to run the script again in
Script Editor this morning, several hours after I'd posted the code,
that the instruction was revealed to be rubbish. Ideally, a top-flight
scripting environment shouldn't be the actual cause of one's errors.
NG
_______________________________________________
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