[cells-devel] Re: [cells-gtk-devel] lots of circular cells in cells-gtk3?
Ken Tilton
kennytilton at optonline.net
Mon Apr 14 16:57:37 UTC 2008
Peter Hildebrandt wrote:
> As you saw in my other mail, I found the intermediate cause of the
> problem: I had included a reference to (id self) in
> initialize-instance of widget. For some reason that causes the
> circularity detection to raise its voice.
>
> What I don't understand, however, is why a reference to the slot in
> initialize-instance :after brings out circularity.
>
> For now, I moved the stuff into the rule for the id slot itself, so
> when the id is calculated, I use it right away, and don't have to
> worry about cell access. slot-value would have been another option, I
> suppose.
>
> But still: why???
Recently some evil programming took forever to debug because I was
re-entering a rule without realizing it. After figuring out that that
was happening and fixing the cause of that, I looked to see why rule
re-entrance had not been detected, which I seemed to recall it always
had been.
Turns out the rule began with without-c-dependency as a trick to run
only once. That macro simply:
`(let ((cells::*call-stack* nil))
, at body)
And that worked because the dependent cell was always identifed as (car
cells::*call-stack*).
Well, I like early bug detection you may have noticed recently <g>, so I
decided the macro without-c-dependency should leave the *call-stack*
intact and instead bind a separate new *depender* special to nil, with
*depender* being the, well, depender honored by the Cells machinery.
You should not have been doing cells-y stuff in i-i, but you got away
with it because of the old without-c-dependency behavior, so...
...congratulations, you are the first victim to fall into my new bug
trap. :)
kt
More information about the cells-devel
mailing list