You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importtw2.coreastwcimporttw2.devtoolsimporttw2.formsastwfclassIndex(twf.FormPage):
classMyFields(twc.CompoundWidget):
b=twf.TextArea()
x=twf.Label(text='this is a test')
c=twf.TextField()
classTableFields(MyFields, twf.TableLayout):
passclassListFields(MyFields, twf.ListLayout):
b=twf.TextField()
tw2.devtools.dev_server()
Gives the following error:
Traceback (most recent call last):
File "myapp.py", line 5, in <module>
class Index(twf.FormPage):
File "myapp.py", line 15, in Index
class ListFields(MyFields, twf.ListLayout):
File "/home/pieter/.virtualenvs/tw2dev/local/lib/python2.7/site-packages/tw2/core/widgets.py", line 81, in __new__
w.post_define.__func__(widget)
File "/home/pieter/.virtualenvs/tw2dev/local/lib/python2.7/site-packages/tw2/core/widgets.py", line 604, in post_define
raise core.WidgetError("Duplicate id '%s'" % c.id)
tw2.core.core.WidgetError: Duplicate id 'b'
The text was updated successfully, but these errors were encountered:
(Posted this in tw2.forms by accident)
Inheritence as described in http://tw2core.readthedocs.org/en/latest/design/#declarative-instantiation does not work. Example code:
Gives the following error:
The text was updated successfully, but these errors were encountered: