Still struggling with the problem of recursive @Blocks, I ran into the
following, what seems to be, fundamental problem:

When a parameter (eg 'block') is accessed, it sets _$block$Cached to
true. After the component finishes rendering, cleanupAfterRender() is
called in AbstractComponent which sets _$block$Cached = false and _
$block = null. The thing is, when you render recursively this way by
having a block render a component that renders the same block
recursively, cleanupAfterRender() is *never called* and sends you into
an infinite loop. 

The problem seems to be that when you recurse you need to have some sort
of stack to store the values at each call level in the recursion. In
this case I suppose those values would be things such as bindings. But
it is my understanding when you recurse like this it doesn't create a
new instance of the component to render on the stack, so to speak, but
rather re-renders the same component which causes some ill side-effects.

I've looked over the following article (as I'm sure many of you have)
many times and I'm not even sure that it would work in T4.
http://www.behindthesite.com/blog/C1931765677/E923478269/index.html
I would love for someone to please either confirm or correct my
understanding on this as. Perhaps I've been looking at the problem for
too long and just need another set of eyes (this is day 3 trying to get
this to work). Thanks in advance.

-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to