On Jan 9, 2007, at 9:50 AM, Diez B. Roggisch wrote:
> >> Yes that worked, I was actually just about to reply with that when I >> got your message. :) >> >> Is this the "expected" thing to happen, or should I file a bug? >> >> It would be useful to be able to pass widgets in dicts in the case >> where you're passing several widgets back to the template. > > I'd thought about this as well, as I've been hit by that more than > once. But > the problem is: you can return arbitrary deeply nested objects, and > it could > be that trying to traverse these would trigger unwanted sideeffects > and > affect the performance - so I'd say it is better keep things as > they are. Yep, that's exactly the reason. > > However, a remedy _could_ be to make compound widgets aware of the > needs of > their children - this would be a one-time thing, at construction time. Compound widgets are already aware of the needs of their children (else the form wouldn't return the calendar's js ;) exposed methods look in the first level of the tree for objects with the retrieve_javascript and retrieve_css method so the possibility exists of implementing an object that works as a widget "bunch" where you can stuff widgets before sending them to the template. Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en -~----------~----~----~----~------~----~------~--~---

