On Aug 26, 2007, at 3:30 PM, Diez B. Roggisch wrote:
> > Alberto Valverde schrieb: >> >> retrieve_resources is never called by TG since the "old" mechanism >> (retrieve_javascript/retrieve_css) is used instead in >> controllers._process_output (which I plan to deprecate sometime...). >> The best way to programatically add javascript is to append them to >> self.javascript inside __init__. However, there's no way ATM to add >> resources once a widget is initialized (which works in both TG 1.0 >> and Pylons). If you need to do the later please open a ticket so >> someone/I can look at it. > > Hrmpf. It's a bit misleading then that it reads in the source > > """ > @only_if_initialized > def retrieve_javascript(self): > #XXX: Should be deprecatred and use only retrieve_resources > from toscawidgets.resources import JSMixin > return filter(lambda r: isinstance(r, JSMixin), > self._resources) > > """ > > > without any comment on the retrieve_resources method that it's > currently > not in use. Pylons and WSGI apps do use it :) (its only TG 1.0 the one it doesn't). However, you're right that I should add a comment in the source explaining it. Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
