swarm-support
[Top][All Lists]
Advanced

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

Re: How to create multiple probes for a class


From: Sven Thommesen
Subject: Re: How to create multiple probes for a class
Date: Tue, 03 Dec 1996 11:02:13 -0600

Tomas Gudmundsson wrote:
> 
> I have many attributes in my model class, so I want to divide them into two 
> or more probes.
> 
> I have tried to simply repeat the code below in the hope that I would get two 
> probes, but I only get the last one.
> 
> //---------------------------------------------------------------------------
>   ProbeMap* probeMap;
> 
>   // Build first customized probe map.
>   probeMap = [EmptyProbeMap createBegin: aZone];
>   [probeMap setProbedClass: [self class]];
>   probeMap = [probeMap createEnd];
> 
>   // Add bunch of variables
>   [probeMap addProbe: [probeLibrary getProbeForVariable:
>     "Somevariable" inClass: [self class]]];
>   ...
> 
>   // Install first custom probeMap into the probeLibrary.
>   [probeLibrary addProbeMap: probeMap For: [self class]];
> 


Well, looks to me as if you are about to wipe out the pointer to the 
first probeMap you created. Perhaps if you renamed 'probeMap' 
to 'probeMap2' in the code below, all would be well ...


>   // Build second customized probe map.
>   probeMap = [EmptyProbeMap createBegin: aZone];
>   [probeMap setProbedClass: [self class]];
>   probeMap = [probeMap createEnd];
> 
>   // Add bunch of variables
>   [probeMap addProbe: [probeLibrary getProbeForVariable:
>     "Someothervariable" inClass: [self class]]];
>   ...
> 
>   // Install second custom probeMap into the probeLibrary.
>   [probeLibrary addProbeMap: probeMap For: [self class]];
> //---------------------------------------------------------------------------
> 
> Thanks
> 
> Tomas Gudmundsson
> Danish Hydraulic Institute

Hope that worked!

Sven Thommesen
School of Human Sciences
Auburn University

PS: (Jeg håper vi sees i Santafe i februar!)



reply via email to

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