This seems dumb … I need to coerce a string into a date. Trivial. But if I do it within a tell statement with OmniOutliner, I draw an error message. If I go outside the tell block and do this:
return date aDateString
it works. Seems wasteful. The OmniOutliner scripting dictionary doesn’t seem to have anything that would cause a problem. Strange (or maybe I’m just unskilled).
Something similar came up last week in relation to iCal. I’m not sure of the full mechanics, but the expression ‘date aDateString’ ” ie. class name + variable ” is a specifier that’s resolved into an actual date object when the line’s executed. If it’s in a tell block to something that doesn’t know how to resolve the specifier, you get an error.
You can either go outside the block, as you’ve done above, or use one of these:
tell application "OmniOutliner"
tell me to set aDate to date aDateString
set aDate to my date aDateString