I guess wxGlade should convert those dollar params into something else during XRC export? Python export works.
WARNING : Ignore malformed argument "['$parent']" for "DataViewListCtrl". Argument format should be: name:value
WARNING : Ignore malformed argument "['$id']" for "DataViewListCtrl". Argument format should be: name:value
ERROR : None
An unexpected error occurred!
Exception type: <class 'ValueError'>
Exception details: XXX use quoted value
Application stack traceback:
File ".../workspace/wxglade/new_properties.py", line 2304, in on_button
self.callback()
File ".../workspace/wxglade/application.py", line 345, in generate_code
writer.finalize()
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 301, in finalize
obj.write(self.out_file, 1)
File ".../workspace/wxglade/widgets/frame/codegen.py", line 45, in write
xrcgen.DefaultXrcObject.write(self, output, tabs, properties)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 230, in write
c.write(output, ntabs + 1)
File ".../workspace/wxglade/edit_sizers/xrc_sizers_codegen.py", line 19, in write
xrcgen.DefaultXrcObject.write(self, output, ntabs, properties)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 230, in write
c.write(output, ntabs + 1)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 67, in write
self.obj.write(output, ntabs + 1)
File ".../workspace/wxglade/widgets/notebook/codegen.py", line 70, in write
xrcgen.DefaultXrcObject.write(self, output, ntabs, properties)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 230, in write
c.write(output, ntabs + 1)
File "..../workspace/wxglade/widgets/panel/codegen.py", line 120, in write
xrcgen.DefaultXrcObject.write(self, out, tabs, properties)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 230, in write
c.write(output, ntabs + 1)
File ".../workspace/wxglade/edit_sizers/xrc_sizers_codegen.py", line 19, in write
xrcgen.DefaultXrcObject.write(self, output, ntabs, properties)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 230, in write
c.write(output, ntabs + 1)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 67, in write
self.obj.write(output, ntabs + 1)
File ".../workspace/wxglade/widgets/custom_widget/codegen.py", line 133, in write
xrcgen.DefaultXrcObject.write(self, outfile, ntabs, properties)
File ".../workspace/wxglade/codegen/xrc_codegen.py", line 199, in write
raise ValueError("XXX use quoted value")
Date and time: 2017-12-18T16:55:49.924912
Python version: 3.6.0
wxPython version: 4.0.0b2
wxWidgets platform: __WXMAC__
wxGlade version: 0.8.0a9
Partially, this was also reported as part of bug #224.
I need to check that one about the 'malformed argument'. It might just have been introduced by loading a file with empty parameter list into 0.8.0. The
$parentand$idprobably should not be converted on export as they are intrinsic to wx.The other one is due to code being entered on the "Code" property page.
Honestly, I'm not sure whether Custom Widgets, arguments or code make any sense at all for XRC export. How do you use the exported XRC?
It would probably be the best to ignore the extra code completely on XRC export. The new fields for "Code to be inserted before / after" are ignored anyway.
I hoped I could load my complete GUI via XRC, maybe using XRCed besides wxGlade. Since XRCed doesn’t work on my system anyway I resolved to "designing" my GUI in wxGlade, exporting to Python and copying to my actual GUI module what I need. (I was used to creating my GUI in code anyway.)
I would suggest to continue generating Python code. XRC is probably too limited.
Did you go through http://wxglade.sourceforge.net/docs/source_code.html ?
Especially when you look at the Wing IDE debugger screenshot at the bottom of the page, you will see that it's much nicer to use Python directly.
Usually, copy & paste should not be necessary if you follow the documentation, except for the first time when copying the empty handlers:
http://wxglade.sourceforge.net/docs/source_code.html#example-2-import-and-override
http://wxglade.sourceforge.net/docs/custom_widgets.html
With the new properties "Code to be inserted before / after" you should be able to achieve everything you need. If not, post on the mailing list as then probably something is missing from wxGlade.
Fixes for bug 224 are in 0.8.0a13, which is online now.