swarm-support
[Top][All Lists]
Advanced

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

Re: MessageProbes


From: Rick Riolo
Subject: Re: MessageProbes
Date: Mon, 23 Mar 1998 08:18:54 -0500 (EST)

Maybe I am not understanding your question, but I can
create a probe which includes a probe for a message
that returns an int:

   probeMap = [EmptyProbeMap createBegin: aZone];
   [probeMap setProbedClass: [self class]];
   probeMap = [probeMap createEnd];
   [probeMap addProbe: [probeLibrary getProbeForVariable: "numAgents"
            inClass: [self class]]];
   ...
   [probeMap addProbe: [[probeLibrary getProbeForMessage: "returnFortyTwo"
            inClass: [self class]] setHideResult: 0]];
   [probeLibrary setProbeMap: probeMap For: [self class]];

and the method is just:

-(int) returnFortyTwo { return 42; }

When I then click that message, the answer 42 appears in the 
little slot next to the left of the message, as expected.

I tried it with a float, the only change being to:

-(float) returnFortyTwo { return 42.1; }

and that worked, too.

Is this what you wanted to do, or are you asking something else
and I just misunderstood?

 - r

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

On Mon, 23 Mar 1998, Russell Standish wrote:

> Date: Mon, 23 Mar 1998 13:29:32 +1100 (EST)
> From: Russell Standish <address@hidden>
> To: address@hidden
> Subject: MessageProbes
> 
> Hi everyone,
>       I wanted to do a message probe on a message that returns a
> simple type (like an integer or floating point.) Unfortunately, when I
> do that, Swarm core dumps with a not particularly helpful error
> message. The only examples of message probes I can find (in heatbugs)
> actually specify setHideResult. I haven't tried this, but I suspect
> that setProbedSelector expects that selector returns an id. However,
> what is one supposed to do when you want to return a numerical value
> to be displayed (the whole point of a Probe). The documentation on the
> MessageProbe class seems obscure on this point. Any ideas?
> 
>                       Yours in perplexity.
> 
> ----------------------------------------------------------------------------
> Dr. Russell Standish                  Director
> High Performance Computing Support Unit,
> University of NSW                     Phone 9385 2833
> Sydney 2052                           Fax   9385 1033
> Australia                             address@hidden
> Room 1410, Library Tower              http://parallel.acsu.unsw.edu.au/rks
> ----------------------------------------------------------------------------
> 
>                   ==================================
>    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]