On 2/6/06, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
> It ultimately wasn't an overhead issue. It was more to do with how the
> widgets are used.
>
> @turbogears.expose()
> def foo(self):
>     return dict(someform = myform)
>
> @turbogears.expose()
> @turbogears.validate(form=myform)
> def save(self, blah, blah2, blah3):
>     pass
>
> That same form instance is used at class initialization time in two
> different methods (at least in this style of forms usage).

OK, the difference is that in Quixote the form is instantiated inside
the method.  I use a factory function for each form.

What if you passed the form class or a factory function instead of the
instance?  Then each thread would have its own instance even though
it's a decorator wrapper, right?  What would be lost in terms of TG
programming elegance?

--
Mike Orr <[EMAIL PROTECTED]>
([EMAIL PROTECTED] address is semi-reliable)

Reply via email to