Как исправить «Не могу сделать пропущенное значение в типе даты» - PullRequest
0 голосов
/ 03 июля 2018

Я пытаюсь перечислить все напоминания из приложения, в котором отсутствует срок выполнения, но я получаю вышеупомянутую ошибку. Любое тело знает, как проверить пропущенное значение в таком случае?

Вот код:

set remListOut to ""
set curDate to current date

tell application "Reminders"
    activate
    repeat with theRemList in remLists
        tell list "@Call"
            set remList to (every reminder whose due date is missing value)
            repeat with theRem in remList
                log (get properties of theRem)
                set remListOut to remListOut & name of theRem & "
"
            end repeat
        end tell
    end repeat
end tell
return remListOut

1 Ответ

0 голосов
/ 03 июля 2018

Я считаю это ошибкой, код правильный.

В качестве обходного пути используйте второй цикл

set remListOut to ""
set curDate to current date

tell application "Reminders"
    repeat with aList in lists
        repeat with aReminder in reminders of aList
            if due date of aReminder is missing value then
                log (get properties of aReminder)
                set remListOut to remListOut & name of aReminder & return & tab & tab
            end if
        end repeat
    end repeat
end tell
return remListOut
...