[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Probing string variables
From: |
Phil Knight |
Subject: |
Re: Probing string variables |
Date: |
Sat, 30 Aug 1997 15:50:18 +0100 |
In article <address@hidden>, Ken Cline
wrote:
>
>Use a char *. With an object, eg String object, the probe
>doesn't have a way to get the value and will probably show
>the class type of the object instead, eg String_c. I think
>this is true for any non base data type. Is that right,
>folks?
>
Thanks, it appears to work now. I was using char c[] instead of char *c,
the probe won't show the value of the former, but works ok with the
latter even though I thought the two should be equivalent.
>Or, you could probe the "string" variable for the String
>class. But the ProbeMap for an object, foo, can only
>contain var probes of foo's instance variables, AFAIK. So,
>you couldn't create a probe display for your modelswarm that
>contains a var probe for the "string" ivar in the String
>class.
I tried the following (not the best way I know!!!, but I'd still like to
know why it doesn't work):
initialFile is id *
in modelswarm.m
in createBegin:
obj->initialFile = [String create: aZone setC: "Initial.data"];
in createEnd:
ProbeMap * probeMap;
...
probeMap = [EmptyProbeMap createBegin: [self getZone]];
[probeMap setProbedClass: [initialFile class]];
probeMap = [probeMap createEnd];
[probeMap addProbe: [probeLibrary getProbeForVariable: "string"
inClass: [initialFile class]]];
[probeLibrary setProbeMap: probeMap For: [initialFile class]];
But when I do a
[probeDisplayManager createProbeDisplayFor: modelswarm->initialFile]
in the observerswarm, I end up with a complete probe display rather than
one for the probe map. Any ideas?
Thanks
--
Phil Knight
==================================
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.
==================================