[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Probes
From: |
Fred Wan |
Subject: |
RE: Probes |
Date: |
Thu, 5 Apr 2001 22:49:20 +0200 |
That is, I believe, the usual procedure. But here I want to include a
variable from the base class in a probemap from a derived class. If I state
a few variables of the derived class to appear in the probemap and I add one
from the base class I get a runtime error (Attempt to add a null probe).
Here's the fragment from the constructor of the derived class (xPos is the
variable from the base class):
EmptyProbeMapImpl probeMapSimpleBug = new EmptyProbeMapImpl(aZone,
getClass());
probeMapSimpleBug.addProbe(getProbeForVariable("bugColor"));
probeMapSimpleBug.addProbe(getProbeForVariable("periodsSinceEaten"));
probeMapSimpleBug.addProbe(getProbeForVariable("xPos"));
Globals.env.probeLibrary.setProbeMap$For(probeMapSimpleBug,getClass());
>
> >>>>> "FW" == Fred Wan <address@hidden> writes:
>
> FW> if a probe is attached to a derived class, it shows only the
> FW> fields present in the derived class and not the base class. If
> FW> variables from the base class should also be shown in the probe,
> FW> what would be the best way to achieve this?
>
> Make a probe map with the variables you want stated explicitly, and
> then register it using Globals.env.probeLibrary.setProbeMap$For.
>
> ==================================
> 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.