Object
|
Question
|
Answer
|
Cormas Installation |
Some trouble to make Cormas run under Windows |
1. Copy the vw30 sub-directory of the CD on your hard disk (I
assume C:\).
2. Go into C:\vw30\Cormas and verify the properties of the cormas.im
and cormas.cha files (they should NOT be read-only !!! Please
uncheck the read-only button if necesseray).
3. Idem for the whole C:\vw30\Cormas\Models sub-directory (uncheck
"Read-Only" for all the files there)
4. Double-click on C:\vw30\Cormas\cormas.im. Windows then is requesting
the executable file to open this kind of *.im files. Click on
"Others" and browse to select the file visual.exe in the C:\vw30\bin
sub-directory.
5. Once VisualWorks is open, from the main VisualLauncher window,
in the "File" Menu, select "Set VisualWorks Home". Sometimes by
default it is set to C:\vw30\Cormas. It should be C:\vw30. Correct
it if necessary.
Here you can find an easier
way to install Cormas on Win.
|
Model installation |
Where should I save a model I have downloaded ? |
Often, the model you get, is a zip file. You must
unzip it into the directory VW3/cormas/Models.
A new directory with the same name as the model is created. It contains
the ".st" file and other subdirectories |
point of view problem |
When trying to change the pov, I have this kind of message: 'Unhandled
exception: Message not understood: #includesKey:' UndefinedObject(Object)>>doesNotUnderstand:
Legend>>addLegend:location: Legend>>majLegendes: GrilleModele>>majPdv:
.....
|
Export and import your model...
For new pov to be taken into account in the legends, the two files
myModel.st and myModel.ev need to be analyzed, which is done when
importing a model...
This bug has been corrected; see here
|
Programming points of view ? |
Can I program the choice of a points of view ? |
Yes. It is necessary to give new value to the "activePov" attribute
of the metaclass Entity. For example, if you want to switch randomly
the pov on the cells every 5 steps, you must add the following
block in the step:t method of the XXX model :
t \\ 5 = 0 ifTrue: [ XXX_Cell activePov: (Cormas selectRandomlyFrom:
XXX_Cell pdvDict keys).
"update the text of the grid bar"
self space interface updateName.
"to force the display of all the cells"
self theXXX_Cells do: [:c | c defineVisualState; show]].
|
Programming the grid size ? |
Can I program the size of the grid ? |
Yes, but just in the first instruction of the init method (just
after having opened the grid, if not the information contained
in the cells can be lost). For ex:
init
self gridSizeCol: 50 line: 20. self initCells. ... then add
the following method :
gridSizeCol: nbOfCol line: nbOfLine
self space interface colonne value: nbOfCol.
self space interface ligne value: nbOfLine.
self space interface actionValideDimensionGrille
|