swarm-support
[Top][All Lists]
Advanced

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

Re: Disappearing ProbeMap and non-functioning controlPanel


From: Rick Riolo
Subject: Re: Disappearing ProbeMap and non-functioning controlPanel
Date: Wed, 1 Sep 1999 06:25:21 -0400 (EDT)

You must not have imported the file that contains the
definition of the controlPanel variable.   I believe
that is gui.h, but you should check the docs to be sure.

Regarding the probedisplay, well, you don't should us what you
are doing, so this is just a guess:  if you just do something like:

  CREATE_ARCHIVED_PROBE_DISPLAY ( parameters );

(where parameters is the object you want to probe)
and don't have anything to pause the program execution
(since your controlPanel was not working),
perhaps what is happening is that it displays it, runs the 
program to completion, and then the probe goes away as the
program finishes execution.

So I am suggesting: get the control panel working, then
see what the probe is doing (or not doing, as the case may be).

I also highly recommend going thru the heatbugs example to
learn what all that stuff does, especially in main and observerswarm
and modelswarm, to get an understanding to guide what you need
to borrow for your own model.

- r

Rick Riolo                           address@hidden
Center for Study of Complex Systems (CSCS)
4477 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 734 763 3323                  Fax: 734 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html

On Tue, 31 Aug 1999, Darren Schreiber wrote:

> Date: Tue, 31 Aug 1999 22:46:00 -0700
> From: Darren Schreiber <address@hidden>
> Reply-To: address@hidden
> To: address@hidden
> Subject: Disappearing ProbeMap and non-functioning controlPanel
> 
> 
> 
> I have added a parameters object to my extremely simple model.  I think the
> parameters object will make it easier to do multiple runs in the future.  I
> am subclassing from Arguments and using the "initSwarmArguments(argc, argv,
> [Parameters class]);" instruction.  It seems to work fine.
> 
> Now, I want to add a probeMap and controlPanel.  I got a probeMap to
> compile and run, but it only displays for an instant before disappearing.
> I tried a few different approaches to solving this with no effect.
> 
> So, I plodded ahead and added:
> 
>   [controlPanel setStateStopped];
>   // Check now if the user hit the quit button: if so, abort.
>   if([controlPanel getState]==ControlStateQuit) return 0;
> 
> Now I get the error:
> 
> gcc -c -Wno-import -g -O2 -fno-inline
> -I/Swarm-1.3.1/packages/swarm/include Parameters.m
> Parameters.m: In function `_i_Parameters__init':
> Parameters.m:81: `controlPanel' undeclared (first use this function)
> Parameters.m:81: (Each undeclared identifier is reported only once
> Parameters.m:81: for each function it appears in.)
> make: *** [Parameters.o] Error 1
> make: Target `all' not remade because of errors.
> 
> I have looked at some examples that use the controlPanel and I couldn't
> figure out what else I need to add.
> 
> As I said, the model is extremely simple right now.  It just creates the
> agents and prints their contents.
> 
> 1.  What do I need to get the probeMap to continue to display?
> 
> 2.  What do I need for the controlPanel to work?
> 
>       Darren
> 
> _____________________________________________
> 
>                Darren Schreiber
>                 Attorney at Law
>                Graduate Student
>            Political Science, UCLA
>               address@hidden


                  ==================================
   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]