Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2014 (closed enhancement: fixed)

Opened 9 years ago

Last modified 8 years ago

[PATCH] WidgetLists do not inherit fields

Reported by: chrisz Owned by: faide
Priority: normal Milestone: 1.1b2
Component: TurboGears Version: 1.1b1
Severity: minor Keywords:
Cc:

Description

The attached patch (against TG 1.1) fixes two minor problems with WidgetLists:

  1. If you have a WidgetList with a couple of declared fields, and you also pass a couple of other fields when initializing the list, then the other fields come first, and the declared fields last. I think it is more intuitive to have it the other way round, with the declared fields being the "basic" fields, and the other fields additional fields added at the end.
  1. WidgetList subclasses do not inherit fields, as discussed in  WidgetsList inheritance not working as expected.

Attachments

widgetlist_inheritance.patch Download (2.5 KB) - added by chrisz 9 years ago.
Fix order and inheritance problems of WidgetFields?

Change History

Changed 9 years ago by chrisz

Fix order and inheritance problems of WidgetFields?

comment:1 Changed 9 years ago by faide

  • Milestone changed from 1.1 to 1.1 beta 2

Would you like to apply it yourself?

comment:2 Changed 8 years ago by Chris Arndt

When applying this, please make sure to add a an entry to the "Changes" section of the Changelog and documentation to the  widgets form tutorial. please copy the widgets form tutorial to the  1.1 section of the docs first.

comment:3 Changed 8 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

Applied in r5764. Also updated the widgets form tutorial for TG 1.1.

Note: See TracTickets for help on using tickets.