-
Notifications
You must be signed in to change notification settings - Fork 2
Property Inspector
- Path
- Description
- Metadata: How the Property Inspector's Behavior Is Controlled
- Retrieving Object Properties
/Contents/Tools/Toolset/palettes/inspector/
Contains no binary stacks, several script-only-stacks and a folder, which contains all the default property editors
sub-folder | filename | description |
---|---|---|
behaviors/ | revinspectorbehavior.livecodescript | |
behaviors/ | revinspectoreditorbehavior.livecodescript | |
behaviors/ | revinspectorgroupbehavior.livecodescript | |
behaviors/ | revinspectorpopupstackbehavior.livecodescript | |
editors/ | (various) | default editor stacks and their behaviors |
revinspector.livecodescript | ||
revinspectortemplate.livecodescript | ||
revstandalonesettingsnew.livecodescript | contains the handlers for managing the standalone settings for a project |
The Property Inspector does not exist as a binary stack. It consists of several script-only-stacks which build the UI in a revPalette.
└── revPropertyInspector [number] (revPaletteBehavior) (revInspectorBehavior) (stack script)
└── card id 1002 ()
├── (group) background ()
│ └── (widget) header_background ()
├── (group) template (revInspectorGroupBehavior)
│ └── (field) rowLabel ()
└── (group) inspector ()
├── (group) [propertyName] (revInspectorGroupBehavior) ()
│ ├── (field) rowLabel ()
│ └── (group) [propertyName] (revInspectorEditorBehavior) ([editor stack behavior]) ()
│ └── Field ()
└── etc.
The information that the Property Inspector uses to build and operate the Project Inspector for an object (or several objects, if the user has selected several) is obtained by calling revIDEPropertiesInfo()
revIDEPropertiesInfo( <longIDsOfObjects> ) -> array
A list of long ids of objects
-
A numerically-indexed array of grouplists (panels/tabs in the PI)
-
Each item consists of the properties that go in that panel in the PI. In the case of a polyList, those are (Basic, Contents, Columns, Custom, Colors, Position, Text, Advanced, Geometry Manager)
-
In the array representation below, key-value pairs are separated with a colon
key : value
├── <number> │ ├── grouplist │ │ ├── <number> │ │ │ ├── label : <property label │ │ │ ├── proplist │ │ │ │ ├── <number> │ │ │ │ │ ├── default : <object type> │ │ │ │ │ ├── editor : <the editor for the property type> │ │ │ │ │ ├── getter : <getter handler, if specified> │ │ │ │ │ ├── group : <name of the line-group. If alone, it is the property name.> │ │ │ │ │ ├── group_order : <numeric position in the group> │ │ │ │ │ ├── label : <label to be displayed> │ │ │ │ │ ├── max : <max value> │ │ │ │ │ ├── min : <min value> │ │ │ │ │ ├── name : <name of the property? there is also a "property_name" key...> │ │ │ │ │ ├── options : <values to appear in a pop-up for an enum or set property> │ │ │ │ │ ├── order : <dunno - order in the group? order of all properties on the panel? │ │ │ │ │ ├── property_name : <name of the property? there is also a "name" key...> │ │ │ │ │ ├── read_only : <boolean - modifiable (see also "user_visible")> │ │ │ │ │ ├── section : <name of the tab/panel> │ │ │ │ │ ├── setter : <setter script handler, if specified> │ │ │ │ │ ├── step : <numeric. display a stepper control and bump value by that amount> │ │ │ │ │ ├── subsection : <dunno> │ │ │ │ │ └── user_visible : <boolean - visible in the PI (see also "read_only")> │ │ │ │ └── etc. │ │ │ └── subsection : <dunno> │ │ └── etc. │ └── label : <tab/panel name> └── etc.
Examples of these calls are present in revInspectorTemplate.livecodescript
set the inspectorData of me to revIDEPropertiesInfo(sSelectedObjects)
get revIDEPropertiesInfo (the long id of <someObject>)
/Tools/Toolset/libraries/revidelibrary.8.livecodescript
The values of all of properties, along with all of the property metadata for all properties in a section (tab/panel) of the Property Inspector
get revIDEPropertiesInfo( <longIDsOfObjects> , "Basic" ) -> array
A list of long ids of objects
- A text-indexed array of property labels
- Each item consists of the properties that go in that panel in the PI. In the case of a polyList, those are (Basic, Contents, Columns, Custom, Colors, Position, Text, Advanced, Geometry Manager)
- Because it is possible for multiple items to have the same label (names are unique, labels are not), there might be more than one property listed for each property label.
- Because the developer can shift-select multiple objects (useful if, for example, you want to change the width or height of multiple objects), the effective and the value are both further broken down with the long id of each object.
- In the array representation below, key-value pairs are separated with a colon
key : value
├── <property label>
│ ├── <property name with the label>
│ │ ├── delimiter : <the delimiter used, if the property is a list of values>
│ │ ├── editor : <the editor to be used with the property>
│ │ ├── effective : <whether the property is calculated based on some other property>
│ │ │ ├── <long id of object> : <boolean>
│ │ │ └── etc.
│ │ ├── label : <label to display in the PI>
│ │ ├── options : <values to appear in a pop-up for an enum or set property>
│ │ ├── order : <dunno. Presumably the spot it appears in the panel, but I have found ties...?>
│ │ ├── read_only : <boolean - modifiable (see also "user_visible")>
│ │ ├── section : <tab/panel where the property appears>
│ │ ├── user_visible : <boolean - visible in the PI (see also "read_only")>
│ │ ├── value
│ │ │ ├── <long id of object> : <value of the property>
│ │ │ └── etc.
│ │ └── widget_prop : <boolean - property belongs to a widget>
│ └── etc.
└── etc.
Examples of these calls are present in revInspectorTemplate.livecodescript
return revIDEPropertiesOfSection(sSelectedObjects, inspectorSectionGetName())
/Tools/Toolset/libraries/revidelibrary.8.livecodescript