Jorge Godoy wrote: > Em Quinta 27 Abril 2006 17:22, Michele Cella escreveu: > > With 3 lines of code I have a working solution but this won't go into > > 0.9a5, I need to flesh out some other things before doing that, for > > example in your code what name do you expect the widget to get? > > If I do: > > name = SomeClassOfWidgetsList()[0] > > I'd expect it to be named "name" for this place. If using the name declared > at SomeClassOfWidgetsList is easier, then I wouldn't bother using the same > name everywhere. But being able to override it in a different place would be > really nice. >
That's why you can't nest WidgetsList, at this point the name is invariable since using a WidgetsList you defined it before, basically if is_named is True the WidgetsList should not modify it. >>> class Foo(w.WidgetsList): ... hello = w.TextField(name="bar") ... name = w.TextField() ... >>> for widget in Foo(): ... print widget.name, widget.is_named ... bar True name True Ciao Michele --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk -~----------~----~----~----~------~----~------~--~---