Мне интересно: возможно ли отфильтровать список с помощью спецификатора логического теста?
Пример:
set allList to every message of mailbox "Sent Messages" of iCloud account "iCloud"
-- gives an execution error:
set filtList2 to every item of allList whose subject contains "test"
, в то время как эта строка работает, как и ожидалось:
set filtList1 to every message of mailbox "Sent Messages" of iCloud account "iCloud" whose subject contains "test"
Я понимаю, что я могу фильтровать список с помощью цикла:
set filtList3 to {}
repeat with aMessage in allList
if subject of aMessage contains "test" then
set end of filtList3 to aMessage
end if
end repeat
end tell
Почему спецификатор булевого теста выдает ошибку в списке?
Спасибо!