如何修复 "Can't make missing value into type date"
How to fix "Can't make missing value into type date"
我正在尝试列出应用程序中缺少截止日期的所有提醒,但出现上述错误。任何人都知道如何在这种情况下检查缺失值?
代码如下:
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
我认为这是一个错误,代码是正确的。
解决方法是使用第二个循环
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
我正在尝试列出应用程序中缺少截止日期的所有提醒,但出现上述错误。任何人都知道如何在这种情况下检查缺失值?
代码如下:
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
我认为这是一个错误,代码是正确的。
解决方法是使用第二个循环
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