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.
Hi rigo,
What wxGlade package do you have installed?
Your suggestion is right. The bug has been fixed few days ago.
https://bitbucket.org/agriggio/wxglade/commits/57e7a7d844ed590fe7b2c65d81ee112ce3ddbe79
Regards,
Carsten
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?
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
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
Hi Arrigo,
there are 5 fixes in the wxGlade repository currently. Could you push all five fixes, please?
Regards,
Carsten
Hello Carsten,
I see many commits in the BitBucket repository... can you please confirm you are talking about the following?
https://bitbucket.org/agriggio/wxglade/commits/b7e763e639d382b18caf9f01e99d08f7364f867a
Wrong SetSizeHint() call in Perl (Thanks to Eric McKeeth)
https://bitbucket.org/agriggio/wxglade/commits/57e7a7d844ed590fe7b2c65d81ee112ce3ddbe79
Fix XRC code generation for notebooks with panes
https://bitbucket.org/agriggio/wxglade/commits/c94dcad734938addc22f83fddaa3af05d37f6b72
Fix too strict sanity checks for class attributes
https://bitbucket.org/agriggio/wxglade/commits/32edb433b035dd2d6c6c161b51c41d9408f3ba2a
Fix "Overwrite existing sources" for new projects
https://bitbucket.org/agriggio/wxglade/commits/6c47fb22bdad1381265a1293a952ad5d16a3af59
Fix an uninitialised variable in saving a project file (sf bug # 157)
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
Hi Carsten,
yes, that would be great! Thank you.
Regards,
Arrigo
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