[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Probes
From: |
Fred Wan |
Subject: |
RE: Probes |
Date: |
Fri, 6 Apr 2001 12:40:03 +0200 |
I'm totally at a loss here... Where do I insert the code you supplied? In
the definition of the base class or the derived class? My guess is the
derived class. When I do so, the compiler can't resolve the method
getProbedClass(). It says it doesn't appear as a base class method... In the
ref guide are at least nine methods getProbedClass() which seem applicable
here (see below). All with the same text (right below), so inconclusive on
that basis:
"The getProbedClass method returns the class of the object that the set of
probes that constitute the probe map points at. "
> VarProbe probeVariable (String name)
> {
> VarProbe varProbe = null;
> Class baseClass = getProbedClass ();
>
> do {
> varProbe =
> Globals.env.probeLibrary.getProbeForVariable$inClass
> (name, baseClass);
> baseClass = baseClass.getSuperclass ();
> } while (varProbe == null && baseClass != null);
> return varProbe;
> }
>
Why doesn't this work:
EmptyProbeMapImpl probeMapSimpleBug = new EmptyProbeMapImpl(aZone,
getClass());
probeMapSimpleBug.addProbe(getProbeForVariable("bugColor"));
probeMapSimpleBug.addProbe(getProbeForVariable("periodsSinceEaten"));
probeMapSimpleBug.addProbe(Globals.env.probeLibrary.getProbeForVariable$inCl
ass("xPos",super.getClass()));
Globals.env.probeLibrary.setProbeMap$For(probeMapSimpleBug,getClass());
And in the description of the getProbeForVariable$inClass one can find:
The getProbeForMessage:inClass: method returns a probe that has been
"checked out" from the appropriate Probes in the probe library.
Was does "checked out" mean? I'm completely puzzled. All help is welcome.
Thanks,
Fred Wan.
Here are the potentiall relevant classes getProbedClass() is a method of:
swarm.objectbase.CustomProbeMapImpl
swarm.objectbase.ProbeMapImpl
swarm.objectbase.Probe
swarm.objectbase.EmptyProbeMapImpl
swarm.objectbase.VarProbeImpl
swarm.objectbase.CompleteVarMapImpl
swarm.objectbase.DefaultProbeMapImpl
swarm.objectbase.ProbeMap
swarm.objectbase.CompleteProbeMapImpl
==================================
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.