cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: [forms] recursive event loops
Date Thu, 15 Apr 2004 14:16:18 GMT
On Thu, 2004-04-15 at 15:32, Berin Loritsch wrote:
> Berin Loritsch wrote:
> 
> > Bruno Dumon wrote:
> > 
> >> I noticed that when I do setValue on a widget in the event handler of
> >> that widget, that CForms goes into an endless loop.
> >>
> >> It would be easy to disable adding new events during event processing,
> >> but I saw the following comment at Form.fireWidgetEvents:
> >>     /**
> >>      * Fire the widget events that have been queued. Note that event
> >>      * handling can fire new events.
> >>      */
> >>
> >> so it seems this behaviour is on purpose. Do we want to keep it that
> >> way, or has anyone other suggestions on how to prevent the endless loop?
> >>
> > 
> > Events are a powerful feature, which means it is just as easy to abuse 
> > it as it is to use it.  I have some general guidelines that I assembled 
> > from working on Swing based applications which I have posted over here:
> > 
> > http://s94077374.onlinehome.us/modules/news/article.php?storyid=12
> > 
> > Please be patient, my site seems to be going up and down lately, and I 
> > am not sure why.
> 
> 
> Oops, try this instead:
> 
> http://d-haven.org/modules/news/article.php?storyid=12

thanks.

Made me think I should solve my problem in a different way (not in an
event listener).

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message