In the VisualAge Organizer window, create a new application named ShoppingList and then create a new visual part named ShoppingServerView.
Use a Text part, a single-selection List part, and two Push button parts to create the server window part as shown in the figure in Using DDE with Smalltalk objects.
Now add a DDE Server part, because this window will be the server. On page one of the General settings for the DDE Server part, specify ShoppingListServer for the Server name. Click New twice to create two new rows in the table. In the first table row, specify shopping for the Topic, groceryitem for the Item, and string for the Format. In the second table row, specify shopping for the Topic, grocerylist for the Item, and smalltalk object for the Format. On page 2 of the General settings, check Clients in same application as server.
Select OK to accept the changes to the settings page.
The objective, visually, is to be able to add items in the Text part to the List part. We also want to be able to remove the selected item from the List part whenever the user selects the Remove push button.
To accomplish all this, add an Ordered Collection part and make the connections as follows:
The objective with the DDE Server part is to provide the contents of the Text part, or the contents of the List part, or both, to any interested DDE client. To accomplish this, make the connections to the DDE Server part as follows:
Save your work and test it.
Try adding a few items to the list by typing in the Text part and selecting Add. Each item should be added to the list. Select an item in the list and then select Remove. The selected item should be removed from the list.
After your window is working properly, leave it running. This will allow us to explore some of the ways VisualAge makes it easy to build a DDE client in the next section.