The Omni Group Forums

The Omni Group Forums (
-   OmniOutliner 3 for Mac (
-   -   AppleScript references with no set or command (

MLModel 2010-11-21 10:47 AM

AppleScript references with no set or command
I have noticed that various AppleScripts online and in OmniGroup's "Useful Scripts" collection contain what might be called "bare references" -- i.e., references that are not used to set the value of a variable or as part of a command. For example, in Useful Script's "Set Named Styles based on Priority Column" script, there is a loop:
[CODE]if MyNamedStyle is not missing value then
named styles of style of MyRow
add MyNamedStyle to named styles of style of MyRow
end if
I am a very experienced AppleScripter, but I have never seen or done anything like this before. What is its purpose? Is this something unique to OmniGroup product AppleScript support (though I can't see how that would be)? Is it just illustrative? It seems very strange to have a line with just a reference followed by a line that includes the same reference.

I would search the Web or an AppleScript site generally for an answer to this, but I can't even think of what search terms to use, so I am asking it here.

whpalmer4 2010-11-21 11:34 AM

It's just there for debugging purposes; if you step over the statement you'll see the value of the expression at that point. If you comment out both of those lines (there's one after the repeat statement as well), you'll see that the script functions identically.

All times are GMT -8. The time now is 05:32 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.