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

[sc-dev] Weird bug with Dictionary-atFail



Dictionary-atFail is broken. It works when called by itself, but the reference in Object-dependants causes very weird behavior.

Point
(0, 0).dependants


You would expect this to output nil, but instead it posts a blank line.

Point(0, 0).dependants.inspect

Also outputs a blank line -- the object inspector does not open.

(
Point(0, 0).dependants.do({ "loop".postln });
"done".postln;
)

You would expect this to post "done" -- but it doesn't.

The bug is fixed by changing Object-dependants, removing the call to atFail:

dependants {
^dependantsDictionary.at(this) ?? { ^IdentitySet.new };
}

I'm not committing this right off because the root problem is with atFail, and jmc will have to look at that.

hjh
____________________________________

H. James Harkins /// dewdrop_world
http://www.dewdrop-world.net

"If attacked by a lion, thrust your arm down his throat.
This takes some practice." -- Cyril Connolly