AppleScript seems to have serious problems dealing with missing values on snow leopard-- as it always tries to coerce the constant ‘missing value’ into the data type expected (text, date).
Now the same is true with Address Book. See this script:
tell application "Address Book"
set cd to current date
set this_year to year of cd
try
-- errors on snow leopard
set birthday_peeps to every person whose birth date is not missing value
on error
-- works on snow leopard
set jesus to current date
set year of jesus to 0
set birthday_peeps to every person whose birth date > jesus
end try
end tell
The error on snow leopard is:
Address Book got an error: Can’t make missing value into type date." number -1700 from missing value to date
Similar to the one posted in the iCal bug I reported earlier:
http://macscripter.net/viewtopic.php?id=30261
I have reported both these bugs to Apple as bug # 7186603 (general missing value issues) and #7183170 (setting missing value in iCal).