Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE: Comment créer une interface avec cormas?

New Message Reply Date view Thread view Subject view Author view

Subject: RE: Comment créer une interface avec cormas?
From: Nicolas Becu (becu@uni-hohenheim.de)
Date: Mon May 15 2006 - 11:57:39 CEST

Hello,

 

I reply in English in case others are interested.

 

In attachment you’ll find the interface of one of CatchScape3’s versions
(it’s just the Interface class, so fill it in and then make a search on
Interface in a class browser. Then go the class methods select “interface
specs” protocol, “windowSpec” method, then the visual tab, then open).

By cliquing on the “Scenario” button, you’ll see several settings that you
can use as examples of how to use interfaces to specify or modify your
scenarios.

For the initialization of the interface, you just need to have the 2
following lines.

            self interface: Interface new.

            self interface model: self.

            self interface open.

(this assumes that you interface class is called Interface, that it has an
attribute “model” and that your model has an attribute “interface”)

 

In brief, it works as so: in your interface you add a button or a value
holder, for ex nbOfHerds. You define this attribute which is called an
“aspect” by cliquing “Define” in the GUI painter tool. In your instance
methods will then appear the method corresponding to your parameter.

Now in your model, you can use this parameter by doing for example “self
createN: (self interface nbOfHerds) entity: Herd”

For more resources on building interfaces, there is an old manual of Cormas
in which the last 5 or 6 pages are dedicated to making interfaces.

Other, you can have a look at the examples which are in VW7 (load parcel
directory Examples, using the Parcel Manager).

 

 

Good luck,

 

Nicolas

 

  _____

From: owner-cormas@cirad.cirad.fr [mailto:owner-cormas@cirad.cirad.fr] On
Behalf Of Fadimata Abdou
Sent: 15 May 2006 08:18
To: cormas@cirad.fr
Subject: Comment créer une interface avec cormas?

 

 

Bonjour,

 

J’aimerai créer une interface pour permettre à l’utilisateur de saisir la
valeur de certains paramètres (comme le type d’année: année pluvieuse, année
moyenne, année sèche; nombre de troupeaux, taille du troupeau, etc. ) selon
son choix. Mais je ne sais pas comment je vais procéder pour créer cette
interface et comment faire utiliser les choix de l'utilisateur dans le
modèle. J’ai cherché sur le site de cormas si je peux trouver des
applications dans lesquelles on utilise une interface, pour avoir une idée
de comment on procède mais je n’ai pas trouvé. Est-ce que vous pouvez
m’aider ?

 

 

Abdou Fati:Etudiante en Master informatique à l'Institut Supérieur de
Gestion de Tunis(ISG). Laboratoire SOIE

Encadreur: Raggad Nasr Agronome INRAT Tunisie

                 Ben Saïd Lamjed Maître Assistant lSG

Titre Projet: Modélisation et Simulation Multi-agents de la gestion durable
des ressources pastorales

mail: abdoufadi@yahoo.fr

Tel: 00(216)22696585. Encliquant

 

New Message Reply Date view Thread view Subject view Author view
 

Back to home