Error getting tags :
error 404Error getting tags :
error 404 set | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
set
Basics
Expander triangle
Type
Command
Syntax
set [the] property [of object] to value
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Assigns a value to a property.
Examples

set the textFont of button "OK" to "Arial"
set the cursor to watch

Additional Comments
Expander triangle

Use the set command to change the setting of a property or custom property.

Parameters:

The property is a built-in property name or custom property name.

The object is any object reference. If you don't specify an object, the property must be a global property.

The value is any expression that evaluates to a string.

Comments:

If you specify a property that doesn't exist, Revolution creates a custom property with that name for the object.

User Comments
Expander triangle
User thumbnail
John Vokey
StarStarStarStarStar
Aug 22, 2009
There is an inherent ambiguity in the set command for creating new, single custom properties that one should be on the watch for. The statement:


set the fred of this stack to "mary"


will, if fred does not exist as a variable, create the custom property fred with the value of "mary". However, if fred already exists as a variable, say with the value "Mary", then the above line of code will, instead, create the custom property Mary, with the value of "mary". The latter behaviour is indeed useful, but hard to catch when you menat the former and not the latter.