Adding the connections
Connect your nonvisual parts to your visual parts as follows:
1. Connect the number attribute of Runner Factory part to the runnerNumberTextObject attribute of the ReusableRoadRaceView part.
2. Connect the finishTime attribute of Runner Factory part to the finishTimeTextObject attribute of the ReusableRoadRaceView part.
Note:
We promoted the object attribute of the runnerNumberText and finishTimeText parts in Creating reusable parts so you would be able to make these connections. These connections give the Runner Factory part access to the contents of the Text subparts.
3. Connect the clicked event of the Record push button to the recordPBClicked script of the RoadRaceView class.
4. Connect the self attribute of the Runners Collection part to the items attribute of the Result List.
5. Set the attributeName property of Result List to asResultString.
Now every time Record is selected, the object factory creates a new instance of the Runner class and adds it to the ordered collection.
Your Composition Editor looks like the following:
Composition Editor
Select Save Part from the File menu.
Select Test iconto test your visual part.
Try entering a Runner number of 451 and a Finish time of 13:45:21, then clicking Record. Then enter Runner number of 277 and a Finish time of 11:20:04, and click Record.
Notice that Result List is automatically updated with a new result added to the Runners Collection. (If the result does not update automatically on your system, click on the Runner number text pane.)
 
Last modified date: 07/15/2020