customPropertySet

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the customPropertySet of object to {setName | empty}
Associationsstack, field, button, graphic, scrollbar, player, image
Summary

Specifies a set of custom properties applied to an object.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the customPropertySet of me to "Mac Properties"
Values
NameTypeDescription
Value

The customPropertySet of an object is the name of the active property set. By default, the customPropertySet of an object is empty.

RelatedCommand: set
Property: customPropertySets
Description

Use the customPropertySet property to create and switch between sets of custom properties and property values.

An object can have multiple sets of custom properties. Each set is independent of the others, and the same property can have different values in different sets. To make a set's custom properties accessible, set the object's customPropertySet property to the name of the set you want to use. The values and properties in the current customPropertySet are used when you refer to a custom property.

If the setName is not already a custom property set, setting the customPropertySet to the setName creates a custom property set named setName for the object.

To use the default set of custom properties, set the customPropertySet to empty.

You can access a property that is not part of the current customPropertySet using array notation. For example, the following statement gets the value of a custom property named "foo" in a custom property set named "myCustomSet" :

get the myCustomSet["foo"] of field "Example"

If using arbitrary custom property names, be aware that it won't be possible to access them by changing the customPropertySet if they clash with LiveCode language keywords. Instead, either use the array style notation above, or use a prefix to prevent name clashes (for example "uName" instead of "name" ).

Tagsproperties