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.
![[6kb 239x247 GIF] [6kb 239x247 GIF]](images/NewProgMenu.gif)
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.
![[7kb 289x218 GIF] [7kb 289x218 GIF]](images/HeaderMenu.gif)
A sub editor will appear
![[8kb 508x196 GIF] [8kb 508x196 GIF]](images/headerEditor.gif)
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>>),
![[8kb 508x196 GIF] [8kb 508x196 GIF]](images/hNonTerminal.gif)
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
![[8kb 508x196 GIF] [8kb 508x196 GIF]](images/Headerfin.gif)
When the files are included, this window can now be closed down. And you should now turn to the code editor.
![[17kb 790x614 GIF] [17kb 790x614 GIF]](images/Sifopstart.gif)
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
![[2kb 507x100 GIF] [2kb 507x100 GIF]](images/Kode1.gif)
To insert an instance of the Administration window, highlight like above and simply press <ENTER>, this will make a new <<AttributeDeclOpt>>, like shown here
![[2kb 491x88 GIF] [2kb 491x88 GIF]](images/kode2.gif)
To make the instance of the Administration window, simply write as shown bellow.
![[3kb 479x117 GIF] [3kb 479x117 GIF]](images/Kode3.gif)
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.
![[4kb 375x326 GIF] [4kb 375x326 GIF]](images/BrowsAd.gif)
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
![[2kb 147x72 GIF] [2kb 147x72 GIF]](images/BrowOpen.gif)
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.
![[2kb 133x106 GIF] [2kb 133x106 GIF]](images/ImpOpt.gif)
by right clicking on the optional
![[4kb 242x255 GIF] [4kb 242x255 GIF]](images/ImpOptRight.gif)
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
![[2kb 448x120 GIF] [2kb 448x120 GIF]](images/IfImp.gif)
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]
|