I am trying, using Boa Constructor, to have the label of a staticText be composed of a string + a variable, something like this:
now = datetime.datetime.now()
d = str(now.date())
self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1, label="Today's date is: " + d, name='staticText1', parent=self.panel1, pos=wx.Point(24, 24), size=wx.Size(144, 32),style=0)
And when I run it it works fine. However, when I try to use the Designer, I get either of these two errors:
NameError: name 'd' is not defined
File: "C\Python25\Lib\site-packages\boa-constructor\Views\Inspectable Vies.py", line 152, in initObjCreator
Am I doing something wrong here or is this a bug, and if so, how can I fix it?
You definitely can't use expressions as string values in the IDE.
What must the poor Designer make of them?!
If you want to use variables in the designed source please use the supported mechanism, called
Thank you, that works great.