It appears that AppleScript knows the special value null.
How do I return such a value from my Cocoa Scripting based app for a scriptable property?
If I return nil (NULL) or NSNull for a scriptable property getter from my Cocoa Scripting-based app, the script editor interprets that as missing value.
And if I return [NSAppleEventDescriptor nullDescriptor], AppleScript even shows an error.
AppleScript uses a
typeNulldescriptor to indicate unassigned/no value, whereasmissing valueis represented by atypeTypedescriptor ofcMissingValue. (It's analogous to theundefinedvsnullmess in JavaScript, and a similar PITA.)