In my message of Thu, 5 Jan 2017 22:13:04 +0000, I wrote:
-- Lose any empty arrays and coerce to list.
set phoneNumbers to (phoneNumbers's arrayByRemovingObject:({})) as
list
Many apologies. 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. :\
I suppose the removal of empty arrays would have to be something like
this:
-- Lose any empty arrays and coerce to list.
set nonEmptyArrayPredicate to current application's class "NSPredicate"'s predicateWithFormat:("self != {}")
set phoneNumbers to (phoneNumbers's filteredArrayUsingPredicate:(nonEmptyArrayPredicate)) as list
But Yvan's just informed me off-list that both of the scripts I posted
last night are errorring when they try to get the group's contacts. From
the error message he getting, it looks as if the group's not being
identified on his machine. I'm looking into that at the moment.
NG