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 #455 (closed enhancement: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] Fix for passing keywords arguments to a Widget constructor

Reported by: michele Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TG Widgets Version:
Severity: normal Keywords:
Cc:

Description

Quoting Matthew Bevan:

An interesting but otherwise unmentioned breaking change is the current inability to pass free-form kwargs to the widget classes. I /was/ passing some additional fields, like "description", when defining a form's widgets. I can no longer do this.

Attachments

kw.patch Download (492 bytes) - added by michele 13 years ago.
the patch
new-kw.patch Download (746 bytes) - added by michele 13 years ago.
New patch following kevin's suggestion
2new-kw.patch Download (750 bytes) - added by michele 13 years ago.
Should use dict not dict

Change History

Changed 13 years ago by michele

the patch

comment:1 Changed 13 years ago by Max <ischenko@…>

Just adding "kw" is not enough, you'd want to set some attribute as well, I guess. Which as that name?

comment:2 Changed 13 years ago by kevin

Yeah, you could do self.dict.update(kw)

Changed 13 years ago by michele

New patch following kevin's suggestion

Changed 13 years ago by michele

Should use dict not dict

comment:3 Changed 13 years ago by kevin

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

this is done as of [581].

Note: See TracTickets for help on using tickets.