Hi,

Thanks for reporting this bug. I was able to reproduce the issue. It was simply 
because GetDefaultPath is overridden with different number of arguments in 
subclasses. In python there is no overloading, so if a subclass defines a 
method with the same name as a method in the parent. That method will override 
the parent method even if it had different number of arguments. There are two 
ways to fix this:
1. Explicitly call the base class method _PathCtrl.GetDefaultPath(self, 
default_path)
2. Change the base class method name to something else and make sure all child 
methods are updated to use the new name.
I prefer the second solution, but I'll let Stani decide.


** Changed in: phatch
   Importance: Undecided => High

** Changed in: phatch
       Status: New => Confirmed

-- 
console traceback when clicked on "font"
https://bugs.launchpad.net/bugs/394041
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Confirmed

Bug description:
Open this action list, doubleclick on "Font: Default", click on the file 
browser icon for browsing fonts, an empty tooltip pops up which would normally 
contain a list of fonts, and this appears in the console each time I click on 
the file browser icon:
Traceback (most recent call last):
  File "/usr/lib64/python2.5/site-packages/phatch/pyWx/lib/popup.py", line 361, 
in OnBrowse
    defaultFile     = self.GetDefaultPath(),
  File "/usr/lib64/python2.5/site-packages/phatch/pyWx/lib/popup.py", line 437, 
in GetDefaultPath
    return super(FontFileCtrl,self).GetDefaultPath(default_path)
TypeError: GetDefaultPath() takes exactly 1 argument (2 given)

_______________________________________________
Mailing list: https://launchpad.net/~phatch-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~phatch-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to