Skip to content

The Face Object Field Name

Christopher Ross-Gill edited this page Aug 1, 2016 · 1 revision

Name

Style/name is the name of the style as a word. This word is used to refer to the style in a GUI dialect block as used by a panel or group. Every face includes a reference to this style name in order to access the attributes and behaviors of the face.


Name

Face/name holds a word that can be used to refer to the face from other faces. For example, the name can be used to set its value, to reset the face, or to clear it, etc.

When a panel is created, all face names are collected and used to create a context for binding the face actions.

Note: for user coding convenience, the name of a face spans more than just its definitional panel (or group).

For example, this code works as you would expect, even though the buttons are part of a sub-panel, not the panel in which the field name was defined:
panel [
    user: field
    group [
        button "Reset" reset 'user
        button "Clear" clear 'user
    ]
]

In cases where it is necessary to open a new name-space, for example in unrelated sub-panels, this can be done with the style/facet/names field. See the GUI Panels document for more information.

Clone this wiki locally