The following files are written by the user:
The demo files are connected in the following fashion:
The example can be started manually by just typing:
cd /xw/applications/adder xbw adder.c
You may exit XbW at any time by pressing F10. If you want to add two numbers:
@myadder();while the mouse cursor is in the XbW window. You will get a commandline at the bottom of the XbW window, where you may modify the command before presing return. Within an instant, your personal calculator will appear. It is based upon the automatically created user interface; but instead of modifying something that was created by a computer, you just have added your own personal window. This is one of the ideas of XbW: you get a large user interface within seconds and than add your modifications within your own window. So, if you change the underlying program (and its data structures), you do not necessarily need to reconstruct your personal additions to the automatically created user interface. After the personal window has been loaded, the example looks like this:
The new window and its objects lay on top of everything that was automatically created. Now, if you have pressed the "+" button, the window will look like this:
The "Sum" field now gets displayed because the program adder has returned a "1" in the "Display" Variable. You should have a look at the files addermfx.h and adder.c at this time. The file myadder.mta shows ats its end, how the "Display" Variable has been linked to the display status of the "Sum" field. If you press "C", the Sum field will get cleared again. The same can be done by selecting the automatically generated window and entering a "0" into the Display Field:
Because during generation, XbW did not know that you wanted to use Display in conjunction with the "Sum" field. So in this window, nothing happens. But if you change back to your "personal" window, the "Sum" field is now cleared (see above).