Menu

#228 Params of Custom Widget breaks XRC export

closed
None
0.8.0a9
2017-12-18
2017-12-18
No

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

Discussion

  • Dietmar Schwertberger

    • assigned_to: Dietmar Schwertberger
     
  • Dietmar Schwertberger

    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 $parent and $id probably 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.

     
  • Henning Hraban Ramm

    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.)

     
  • Dietmar Schwertberger

    • status: open --> closed
     
  • Dietmar Schwertberger

    Fixes for bug 224 are in 0.8.0a13, which is online now.

     

Log in to post a comment.

MongoDB Logo MongoDB