Ultra Light Client Guide and Reference

Connecting the parts

When you have finished, your sample will look something like this:
Completed ToDoList part

Making the attribute-to-attribute connection

To display the contents of the collection in the list, make an attribute-to-attribute connection between the Table Model part and the List part. The purpose of this connection is to initialize the List part. Whenever an item is added or removed from the collection, the items displayed in the list are automatically updated. Select the model attribute of the List part and linking it to the self attribute of the Table Model part.

  1. To start the connection, display the pop-up menu for the Table Model part and select Connect, then self. The mouse pointer changes to indicate that you are in the process of making a connection. If you accidentally started the wrong connection, use the Esc key to cancel it.
  2. To complete the connection, click mouse button 1 on the List part. From the pop-up menu that appears, select model. A connection line is now displayed from the Table Model part to the List part.

Important: Use ULC attribute-to-attribute connections only to initialize part attributes. To keep ULC part values in sync, use event-to-action connections.

Making the event-to-action connections

The To-Do List application is supposed to add the text entered in the entry field to the list when the Add button is clicked and to remove the item selected in the list when the Remove button is clicked. To make this happen, you must make event-to-action connections between the Button parts and the Table Model part. You make these connections to the Table Model part instead of to the List part because the Table Model part is the one that maintains both the items entered and the order in which they were added.

  1. Connect the action event of the Add button part to the addRow: action of the Table Model part. A dashed line appears, which means that more information is necessary. In this case, the parameter for the addRow: action is missing.
  2. To supply the parameter, connect the value attribute of the Entry Field part to the aRow attribute of the previous connection.
  3. Connect the action event of the Remove button part to the removeRow: action of the Table Model part. A dashed line appears, which means that more information is necessary. In this case, the parameter for the removeRow: action is missing.
  4. To supply the parameter, connect the selectedItem attribute of the List part to the aRow attribute of the previous connection.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]