  | |  | Re: Subject: treeTrace | Re: Subject: treeTrace
2004-02-19 - By Troy Gardner
Back > The problem is that as you can test with duplicating treeTrace(obj, 'obj ');
> // there is a test-object provided in the script at the link above
>
> So you have like this:
> treeTrace(obj, 'obj ');
> trace( "\n\n\n ")
> treeTrace(obj, 'obj ');
>
> As you will see is that the second time you trace the object then the
> treetrace wont dig down in the object.
The tool is nice but it 's doing something very evil. It 's polluting the traced
object with persistant flags to hide them if they 've already been traced, thus
why they don 't show again.
e.g.
a = new ClassA();
a.i = 0;
a.j = 1;
b = new ClassB();
b.a = a;
b.c = a; //duplicate
'b '
+-- 'a '
| +- i =0;
| +- j =1;
+- 'c ' - >same as a
The code should either store the hide fields in a lookup table (which is
expensive timewise), cleanup after it 'self or not try to do that.
To get turn off the behavior in the 'doTreeTrace() " comment out the
'this.setObjectId(mixedValue); '
and
'this.setObjectTraced(mixedValue); '
lines.
I modified the copy I have for this to be set via a flag and some other minor
changes. Email me if you want a copy.
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104787
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |