Custom property

Jeanne A. E. DeVoto jeanne at runrev.com
Tue Feb 11 23:09:28 EST 2003


At 10:13 AM -0800 2/9/03, Revinfo1155 at aol.com wrote:
>Could someone define a custom property and give me an example
>and a "How to set one up!

Here's a bit from the documentation (About properties, custom properties,
and property sets):

--------

A custom property is a property that you define. You can create as many
custom properties for an object as you want, and put any kind of data into
them (even binary data). The value of a custom property can be a string or
array.

You can define custom properties for any object, but you cannot define
custom global properties.

Use a custom property when you want to:
* associate data with a specific object
* save the data with the object across sessions
* access the data quickly

Using the value of a custom property:
Custom property references look just like built-in property references. For
example, to use a custom property called "lastCall", use a statement like
the following:

  put the lastCall of this card into totalWidths

Creating a custom property:
If you set a custom property that doesn't exist, Revolution automatically
creates the custom property and sets it to the requested value. This means
that you can create a custom property in a handler or the message box,
simply by using the set command as shown above.

You can also view, create, and delete custom properties in the Custom tab
of the object's Properties palette.

Changing custom properties:
You set the value of a custom property by using its property name with the
set command, in the same way you set built-in properties:

  set the myCustomProperty of button 1 to false

------
Glossary definition of custom property:

custom property
An object property you define. A custom property can hold any data you want
to associate with the object.
-----

If this doesn't help, please let me know....

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list