Problems getting and setting user-defined attributes in Mori 1.4

Tags ( )

I'm completely unable to get and set values for user-defined columns (text or boolean). I've tried a number of syntaxes, including that recommended by Jesse here (http://www.hogbaysoftware.com/node/1696). When attempting either to get or set values I receive an NSInternalScriptError. I can successfully get and set values for pre-defined columns with no trouble using several syntaxes including the get and set attribute syntax Jesse recommends. Is this a known issue with Mori 1.4 or am I missing something particular about user-defined columns?

Also, I've noticed that if I define a boolean column, I cannot compile the following in the Script editor:

set attribute entry "test" name "completed" value true

The line above is automatically changed in the Script Editor to:

set attribute entry "test" name "completed" with value

I haven't scripted in a

I haven't scripted in a while so I was waiting for Jesse to reply, but the scripts I wrote a while ago for 1.4 use this syntax:

set colGTD to "GTD"
tell theEntry
set attribute name colGTD value "act"
end tell

But now that I'm testing it out, I get the same thing as you described if I try to add another line like:

set attribute name "Checkbox" value true

I get that strange change with the "with value"

I think it has something to do with ending the line with "true," which the complier seems to be misconstruing.

if I try this:

set trueProxy to true
tell theEntry
set attribute name "Checkbox value trueProxy
end tell

Then everything seems to work--the script checks off the selected item in the Mori document.
Let me know if that works for you.
Best,
Jeff

Thanks for the response. Now

Thanks for the response. Now that I'm running Mori on another day with several restarts in between, getting and setting user-defined attribute values in Applescript seems to be working fine (I swear that all user-defined columns, but not default columns, were unreachable two days ago using the set attribute syntax! :-) ). At that time, getting and setting the Checkbox column was working fine using the method you mention to get around the Applescript Editor's dislike of the "true" line ending--I mentioned that just for informational purposes--but trying to get or set the value of user-defined boolean or text columns threw an error. Now, no problem.

In the words of the immortal Emilly Litella...well, you know.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.