Parameter-from-attribute
Parameter-from-attribute connections use the value of an attribute as the parameter to a connection. As with other connection types, a parameter-from-attribute connection is initiated from the source part's Connect choice in the pop-up menu and is terminated by clicking mouse button 1 over the target connection line requiring the parameter. The appropriate attribute is then selected from the pop-up menu for the connection. A parameter-from-attribute connection was used in building the To-Do-List sample. When we connected the Text part's object attribute to the connection between the Push Button part and the ordered collection part, we were making a parameter-from-attribute connection. Refer to Event-to-action connections for the specific connection details for the To-Do List sample. The following example also illustrates the use of the parameter-from-attribute connection:
1. Place a Text part, a Label part and a Push Button part within the default Window part in the Composition Editor.
2. Connect the clicked event of the Push Button part to the object attribute of the Label part.
3. Now, make the parameter-from-attribute connection by connecting the object attribute of the Text part to the value attribute of the connection pop-up menu.
When text is typed into the Text part and the push button is pressed, the label string will be set to match the text in the Text part.
Last modified date: 06/27/2019