Testing the Open To-Do File button
Now that you have made all the connections for the Open To-Do File button, you
are ready to test the work you have done so far.
To test the current state of the To-Do List program:
- First, prepare a simple text file to use for testing. Use the Scrapbook window to create
and save a sample To-Do file called test1.txt with the following lines in it:
Get a mortgage
Buy home
Buy 2nd car
Renovate home
Ask for a raise
- Save your current work in the Visual Composition Editor by selecting Save Bean
from the Bean menu. VisualAge for Java generates code to implement the connections
you specified in the last step.
- Select Run from the tool bar.
- The To-Do List program appears.
- Select the Open To-Do File button. A file dialog like the one below should
appear. Note that the bottom right-hand button says "Open". If you
simply leave the cursor on Open without clicking, hover help tells you what the button
will do.

- From this file dialog, go to the drive and directory in which the test1.txt file
is located. To select a drive, click Program and select a drive. The
directories and files from the drive are shown. Select your file and click Open.
- The To-Do List in your program should now be loaded with the items from the test1.txt
file:

Now that you have tested your current progress on the To-Do List program, you are ready
to complete the program by making the connections from the Save To-Do File button.
