swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TkExtra -- Swarm App w/o X


From: Laszlo Gulyas
Subject: Re: TkExtra -- Swarm App w/o X
Date: Mon, 27 Jul 1998 12:24:03 +0200 (MET DST)

On Mon, 27 Jul 1998, Anne Baretta wrote:

> Hi,
> 
> You can easily modify main.m to always run in batchmode, disabling the
> following which starts the ObserverSwarm, and make it start the
> BatchSwarm instead.
> 
>   if (swarmGUIMode == 1)
>   {
>        // We've got graphics, so make a full ObserverSwarm to get GUI objects
>     printf("Create prprobserverSwarm.\n");
>     prprobserverSwarm = [PrPrObserverSwarm create: globalZone];
>     ...

Well, this one won't work, as the error occures in initSwarm which is
called before this (actually that's the place where swarmGUIMode is
set)...
>   
> You can also use your shell to set an alias: 
> 
> alias model='model -batchmode' for bash, alias model 'model -batchmode'
> for tcsh.

I know, I could do this. I could also extend the command line parameters
in main.m to have an additional '-batchmode' argument all the time.
However, it seems awkward to me to have a bounch of code in my program
which could never get executed, since I coded so. It's like having the
following code in my program:

 aVariable = 0;
 if (aVariable > 0) {

    // huge bounch of code
 }


So, why to have that code in there anyway?


BTW, Thanks for your comment.

Regards, Gulya


> 

> Regards, > 
> Anne
> 
> On 27 Jul, Laszlo Gulyas wrote:
> > 
> > Well, I was not clear enough. Sorry for that!
> > 
> > If I say '-batchmode', it works. However, I find it awkward to always  
> > spell it out. Any chance to change the default? (I mean, if there is no
> > such a thing as GUI in the model, why am I supposed to specify it
> > run-time?)
> > 
> > Sorry, if I am pushing unimportant details...
> > 
>  
> 
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
>                   ==================================
> 


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]