Hi Simon,
a property you can either only get or get/set. Some are read only and you can only get them, some you can also set.
Put is a different story. Put is for containers, not properties. Container beeing a variable/Field/file.
If you issue a put command for a property you implicitly do the following: get myProperty, put it into myVariable or myField. With the put you grab the value of the property and put it into a container.
Rev might be confusing in that you can not PUT a value into a property, you can only set a property.
Code: Select all
put 5 into the thumbpositon of scrollbar 1 -- does NOT work
set the thumbposition of scrollbar 1 to 5 -- works
You have to use set for that. If you address a property you should use THE before the property. This is especially important if you create a custom property. Rev has no way to distiguish between a variable and a custom property except for the THE. Example
Code: Select all
set the uValueOfThumbposition of this card to 5
In this line of code you create the custom property uValueOfThumbpositon of the current card and set it to 5.
You can than access this custom property from anywhere in your stack.
Code: Select all
put the uValueOfThumbpositon of card xyz into myContainer
Any object in Rev can have custom properties, you can look at them in the properties inspector -> Custom Properties. I explained this in a little more detail because I rarely use global variables for the simple reason that I find them harder to maintain, who puts what into them when. And they are not persistent, after closing the stack they are gone. Custom properties are saved with the stack, next time you open the stack they are still there. If not using custom properties I prefer script local variables over global variables whenever possible.
Anyways, I hope my attempt at an explanation does not add confusion but helps a little.
regards
PS did you try the offset script? (
http://forums.runrev.com/phpBB2/viewtop ... 478#p21478)
Bernd