To make the Beta program, use the source code editor and select New BETA program in the File menu. This will generate a new BETA program. Again it will ask for a name, We called it MyProgram.
If you look at the fragments window in the upper right corner of the code browser, you will notice that, instead as in the MyShop file (the model file) and MyGUI file (The GUI file), where it said either lib: Attributes and Guienvlib: Attributes, it now says Program: Descriptor.
To include the lib files in MyProgram's environment, they have to be inserted into the fragment list, which is shown in the upper right corner of the code editor. This is done by using either Edit ORIGIN, INCLUDE etc. in the Fragments menu.
A sub editor will appear
Inserting new text into the fragment list, is now done by first using the Show Optional Non terminals in the Edit menu or pressing <CTLR> and <l> this will prompt an non terminal (Non terminals are always shown as << NonTerminal>>),
in which it is possible to write the the additional text, Highlight the
optional non terminal as shown above, and start writing, the code editor
will then automatically go into Edit text mode, this mode can also
be entered by using the shortcut <CTLR> and <SPACE>. The text which
should be inserted is:
INCLUDE 'MyShop';
INCLUDE 'MyGUI';
To get out of Edit Text mode simply press <CTLR> and <SPACE>
and the fragment list should then look like
When the files are included, this window can now be closed down. And you should now turn to the code editor.
First make the program af subclass of GUIenv, by highlighting the <<Prefixopt>>
like shown above, and writing 'guienv'.
then to make use of the windows designed earlier in this tutorial,
we want to make instances of the first an instance of the sales window.
Now highlight the <<AttributeDeclOpt>> either by using the arrow
buttons or with the mouse. Then write 'MyShopWin: @MyShopWindow;', the
program should now look like this
To insert an instance of the Administration window, highlight like above and simply press <ENTER>, this will make a new <<AttributeDeclOpt>>, like shown here
To make the instance of the Administration window, simply write as shown bellow.
Now there is an instance of the MyShopWindow and an instance of the MyAdminWin.These instances of windows will not be opened without a call to the open method in the Window pattern.
Now the open method can be shown by double clicking on the three dots, this will show the virtual pattern open. Again if you want to see the virtual method declaration just double click on open
and Mjolner will follow the virtual binding, up the hierarchy.
Now to get back, use the Back shortcut <CTRL> and <b>
or right click and use the menu.
Among many other features, the menu View gives the programmer
the opportunity to make the view of the code as an overview, abstract,
Detail
and Detail Recursively, these features makes it easier to comprehend
and overview large programs.
by right clicking on the optional
A list of imperatives will appear, ex a simple If Imperative, which will make an the structure for a simple If imperative. Like shown below
It is now easy to write the if imperative.
These optionals, as written earlier, is a big help to the programmer
in the startup phase. When the actual programming is finished and only
editing on the code is made, the shortcut <CTLR> and <SPACE> or using
the Edit Text in the Edit menu, will make it possible to
edit the highlighted code.
Good luck with your use of the Mjølner tools.
Mjolner Integrated Development Tool - Tutorial | © 1991-2002 Mjølner Informatics |
[Modified: Friday August 17th 2001 at 15:56]
|