Skip to content

Property Definition Files

codeCatLady edited this page Sep 16, 2022 · 3 revisions

Property Definition Files

This article is included for completeness and future-proofing. LiveCode has previously stated that the LiveCode Builder property metadata functionality will eventually be replaced by these files, which are used for non-widget objects in LiveCode. The property metadata based on this design.

Property Definition files are located at Contents/Tools/Toolset/resources/supporting_files/property_definitions

  • .tsv files, one line per property:
  • propertyInfo.txt contains base info about object properties
  • Each of the files com.livecode.interface.classic.<objtype> contain information on object properties in the context of the given object type.
Item Name Format Description
Property Name propertyName : optionalCustomGetter : optionalCustomSetter If a custom setter is specified, it must be a command with the following parameters: <objectLongID>, <propertyName, and <propertyValue>.
If a custom getter is specified, it must be a function with the parameters <objectLongID>, and <propertyName>.
Label If specified, used instead of Property Name
Section Corresponds to a tab in the Property Inspector
Editor The editor to be used to edit the property
User Visible boolean Controls whether the property appears in the Property Inspector
Read Only boolean Controls whether the property can be modified in the Property Inspector
Group Grouped properties will appear in the same row, if possible. All properties that specify the same group will be affected. The group name will appear in the Property Inspector.
Default Default value assigned when the object is created in the IDE (i.e. by dragging from the Tools palette). Default values may use the execute: syntax. If they do, the script is executed, and the contents of the it variable are becomes the default value for the property.
Options comma-delimited for an enum (i.e. a list of options) property - selected from a popup menu.
To display a different value in the menu than what is assigned to the property after it is selected, use a colon between the assigned value value and the displayed value, e.g. opt1:Option 1,opt2:Option 2
Min numeric minimum numeric value. If both a minimum and maximum value are specified, a slider will appear next to the property value for users to use, as well as a field.
Max numeric maxinum numeric value. If both a minimum and maximum value are specified, a slider will appear next to the property value for users to use, as well as a field.
Step numeric The amount by which a numeric property should be changed. Specifying this will show a stepper control next to the property value, as well as a field.

References

LiveCode Global 2018 Day 1: Hacking the IDE: properties, with Elanor Buchanan - this presentation is paywalled. Property Definition Data Files