#156 Exception while generating XRC code for Notebook

Official Release
Arrigo Marchiori

wxGlade version 0.6.7

The XRC code generation for wx.Notebooks fails with the exception "List object is not callable".

The reason behind this exception, if I understood correctly, is in the file widgets/notebook/codegen.py, inside function xrc_code_generator(obj).
The problem is that the method write() of class NotebookXrcObject overwrites the method named tabs that belongs to one of its superclasses, with a list of... tabs, I guess, taken by self.properties['tabs'].
When generating the code, another method of the superclass tries to access the tabs method, but it finds that list instead, and raises the exception.

Possible solution: inside file widgets/notebook/codegen.py, function xrc_code_generator(obj), inside class NotebookXrcObject, inside method write(self, outfile, ntabs), substitute all occurrences of self.tabs with self.notebookTabs.
This, at least, seems to solve the problem on my system.


    • status: open --> accepted
    • assigned_to: Carsten Grohmann
  • Hello Carsten,

    thank you for the quick reply!

    I am using wxGlade version 0.6.7, installed from the FreeBSD port:

    Are you planning to make a new bugfix release any time soon?

  • Hello Arrigo,

    Initially I wouldn't release another bugfix-only release. The current development version contains a few fixes for various bugs. Maybe I'll publish a bugfix release within next 8 weeks.

    Would you need a bugfix release?


  • Well... Thank you for asking! I leave this decision to you, I believe you know much better than me when it's time for a new release :-)

    I was only asking because I would like to "push" the fix to the FreeBSD port, so that the problem can be solved for all FreeBSD users. Knowing that the next release is coming in 2 months, I will contact the port maintainer and propose a patch based on your commit, so that, in the meantime, we will have a working XRC generation.

    Thank you for your assistance!


  • Hi Arrigo,

    there are 5 fixes in the wxGlade repository currently. Could you push all five fixes, please?


  • Hi Arrigo,

    That are the changes. Just putting the changes together wouldn't work probably. I would you provide a working patch this weekend. OK?


  • Hi Carsten,

    yes, that would be great! Thank you.


  • Hi Arrigo,

    I've created a patch and attached the file. The Patch fixes a lot of bugs.

    I close the ticket now.

    Thanks for reporting this bug.

    Last edit: Carsten Grohmann 2013-05-25
    • status: accepted --> closed