Menu

#156 Exception while generating XRC code for Notebook

closed
None
2015-12-30
2013-05-17
No

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.

Discussion

  • Carsten Grohmann

    • status: open --> accepted
    • assigned_to: Carsten Grohmann
     
  • Arrigo Marchiori

    Hello Carsten,

    thank you for the quick reply!

    I am using wxGlade version 0.6.7, installed from the FreeBSD port:
    http://www.freshports.org/devel/wxGlade

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

     
  • Carsten Grohmann

    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?

    Regards,
    Carsten

     
  • Arrigo Marchiori

    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!

    Regards,
    Arrigo

     
  • Carsten Grohmann

    Hi Arrigo,

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

    Regards,
    Carsten

     
  • Carsten Grohmann

    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?

    Regards,
    Carsten

     
  • Arrigo Marchiori

    Hi Carsten,

    yes, that would be great! Thank you.

    Regards,
    Arrigo

     
  • Carsten Grohmann

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

     

    Last edit: Carsten Grohmann 2013-05-25
  • Carsten Grohmann

    • status: accepted --> closed
     

Log in to post a comment.