On 1/17/06, Jorge Godoy <[EMAIL PROTECTED]> wrote:
> Kevin, I dunno if you'll accept the move of the javascript attribute from
> outside to inside the __init__() method, but that was the only way I could
> think to override the language here without adding too much code or making
> things worse.

I wouldn't do that as written. You shouldn't change a class attribute
in __init__. You could change it to self.javascript...

Should the language be assumed to be the same for each visitor and
each request? I don't think so, in which case setting that is not the
right solution. Widgets are stateless, which means that each request
uses the very same widget object. So, dynamic, per-request behavior
has to happen in the methods that get called on the widget during
request processing.

I'm going to give some thought to making widgets stateful (ie
instantiated per request) so that people don't get tripped up by that.
I'm not sure if I can do that without causing minor breakage to
existing widgets (but, I'll see!)

Kevin

Reply via email to