[Seaside] Little (OT) problems

Avi Bryant avi@beta4.com
Wed, 3 Apr 2002 23:05:07 -0800 (PST)


On Thu, 4 Apr 2002, Kamil Kukura wrote:

> Also, yesterday I managed by accident embed in component's template the
> component itself. It resulted into infinite loop and continuous objects
> creation. My image grown up from 12 mega to 55 :) Maybe it would nice to
> have some detection of this..

Yeah, the problem is that's sometimes actually useful - if guarded by an
<if>, recursive components are good for building trees, etc.  However,
there are a number of issues right now stemming from the lazy creation of
subcomponents that makes this possible, so what I may do is force you to
explicitly mark a subcomponent as recursive or lazy if you're using it
that way, and precreate all the rest.  With that, you could detect at
least the simple case of embeddeding a component directly into itself
quite easily.