next up previous contents index
Next: Projects Up: Interactive Elements Previous: Putting It All Together

Problems of the Interface

 

When working with the Rot2d program you will notice that the buttons were added from the top and the rulers from the bottom of the menu (this is the default), therefore the rulers are ``upside down''. It would be better to group all buttons and rulers together and to rearrange them, this would make life easier.

The values of the current ruler are not limited, therefore we can change it to an invalid value. Without the error check in the methods "update-point", "insert-point" and "delete-point" the program would not be very stable.

We forgot to add the suffix "-send" to the Rot2d methods for inserting and deleting points. This would be no problem if we hadn't put the method on buttons, now we can call the equally named Triang1d methods by just changing the current object to axis or curve and pressing one of the buttons. But these method need a parameter therefore the result is undefined.

The biggest problem is created by the way the rulers are bound to the Rot2d instance. It is possible to delete the instance within the manager (just press the expand button in the main menu, then click on the Rot2d instance and delete it with one of the delete buttons), then the pointer for the ruler variables and instance will point to nowhere. Just try it and look at the ruler values, if you are lucky the program will not crash if you edit them. A solution for this problem would be to put the rulers into the Rot2d structure, then they could be deleted with the instance.

Only one Rot2d instance can be edited because the rulers are explicitly bound to it. Of course we can call "get-editor" on a second instance, but what would happen? We would get a second set of rulers, but we cannot decide which rulers belong to which instance. We would get a second set of buttons even though we don't need them. Even worse, the pointers to the coordinate rulers would be overwritten, calling "update-point" would always update the rulers for the second instance (again this problem could be solved by putting the rulers in the Rot2d structure).

Most of the problems can be solved easily, this will be done when we create a project out of this demo program in the next section.


next up previous contents index
Next: Projects Up: Interactive Elements Previous: Putting It All Together

SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.