Creating variables
Richard Gaskin
ambassador at fourthworld.com
Wed Aug 6 10:56:57 EDT 2008
Eric Chatonet wrote:
> In Revolution, you can write:
>
> put the long ID of fld "MyField" into tObj
> put empty into tObj
> set the showBorder of tObj to true
> etc.
>
> As soon as you have put a long name/ID into a variable, you can use
> it without any 'do' :-)
> Secure and easy...
...and fast.
In Rev, scripts are runtime-compiled, so you'll generally see some
amazing speed with most operations. But "do" and "send" can't be
compiled on load like everything else, since the strings they operate on
need to be assembled at runtime. As a result, "do" and "send" will run
more slowly than compilable alternatives like the example Eric noted above.
François Chaplais wrote:
> I think I have found a workaround for working with "variables"
> referenced by names. It involves custom property sets.
> Moreover the variables can be accessed globally and are stored in
> the stack file upon save. haven't tried in in a standalone for the
> moment, though.
The OS prevents applications from modifying themselves, so any
modifiable data that you want to save will need to be stored separately
from the stack file that becomes the standalone.
For good info on saving data in standalones check out this article at
revJournal.com:
Saving data in Revolution standalones
by Sarah Reichelt
<http://www.revjournal.com/tutorials/saving_data_in_revolution.html>
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list