Kevin Dangoor <[EMAIL PROTECTED]> writes:

> By setting CalendarDatePicker.javascript, you're changing the property
> *for all instances* of CalendarDatePicker... not just the one you're
> instantiating.

You're right.  Never write code while in bed, going to sleep.  :-)  Specially
if you're testing just simple cases.

> Oh, I see. You can use _() as you do there, or use lazygettext to do
> it at request time. That seems reasonable.

Which one is preferrable? 

> You should be aware, though, that your example above (if used in a
> form declared outside your controller) will only process _('pt-utf8')
> once, at instantiation time. It won't vary from request to request.

Hmmmm...  So lazygettext seems the correct way to do it. 

> The locale is, but unless you use lazygettext you're running the _()
> call at instantiation time and not at request time... that's the
> tricky bit of business around using stateful objects in a
> multithreaded web environment.

Yep...  I'm noticing that.  I'm not used to the web environment yet...  And
I'm starting to think that I am wanting to do too much :-)  It was simpler on
a GUI, where each user had its own installation and just the RDBMS part was
shared... :-)

I'll redo the patch.  And see what I can do to make it better...  (No, I'm not
going to bed now ;-))

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to