Section 2 - Modules, Time Levels and Lists
To see these select browse module hierarchy from the Browse menu. It will look like this:
At the moment there is only the module (called standard) that holds what automatically comes with SDML. It contains all the ready-made primitives, types and objects. Every new module we create will need to inherit all its contents. You always need a least one more module to hold your work.
In the Module Hierarchy window select the standard rectangle so it is highlighted (in yellow). Use the command button to select add submodule and enter the name intro2. Now select the Workbenches tab on the SDML Launcher and use the command button to select add workbench in the Workbenches: pane. Enter sdml-intro1 and then select the intro1 module in the dialogue box that appears. If all is well the SDML Launcher will look something like this.
Each workbench acts like a view its the corresponding module. Each workbench will remember what windows you had open and in what state. You could have several workbenches for a module for different purposes (e.g. one for debugging and one for running simulations). Likewise you may have modules that just provide extra features for other modules with no workbench attached to it at all.
You can not add to the standard module, this means that you must create at least one other module if you want to do any programming.
Click on the intro1 module in the Module Hierarchy. Use the command button to select the remove module command.
Notice that the associated workbench sdml-intro1 disappears as well since it was merely a view of the intro1 module.
In general SDML acts like this, if you remove something that is needed else where (like a clause definition, a type or a module) it will also remove anything that depended on its existence. Don't be too worried, it always warns you and there are often ways of undoing an unwanted removal.
Create a second module called intro3 and a workbench linked to it called sdml-intro3 ready for tomorrow. The module hierarchy should now look something like this.
We are going to load a prepared module from disk for our work today. This will have the requisite clauses already defined to save time.
Select the standard module in the Module Hierarchy browser (it goes yellow) and use the command button to load SDML file. Just press OK on the dialogue and a list of SDML module files will be displayed. Select the intro2-1.sdm file.
A new module called intro2 will be created.
In the SDML Launcher create a workbench view of this new module called sdml-intro2. Use the command button to enter workbench.
Generated with CERN WebMaker