I went for solution 3 which is provide all the GetDefaultPath methods with the same set of arguments. Thanks Nadia for analyzing that saved me time. About the empty dropdown list that is the intended behaviour. The drop down list autocompletes the current text. So if the text is Default and you don't have fonts which start with Default, it is completely normal the dropdown is empty. To check you should empty the font field and than all the available fonts will popup. Please test this, Dr Slony. If you start typing it will filter the list of fonts down to the partial font input.
Thanks for reporting this bug, please test if it is fixed for you from the latest bzr
- def GetDefaultPath(self):
- value = self.path.GetValue()
- #default_path = os.path.dirname(font_dictionary().get(value,value))
- default_path = font_dictionary().get(value,value)
+ def GetDefaultPath(self,default_path=None):
+ if default_path is None:
+ value = self.path.GetValue()
+ default_path = font_dictionary().get(value,value)
if not os.path.isdir(default_path.strip()):
for path in FONT_PATHS:
if os.path.isdir(path):
I went for solution 3 which is provide all the GetDefaultPath methods with the same set of arguments. Thanks Nadia for analyzing that saved me time. About the empty dropdown list that is the intended behaviour. The drop down list autocompletes the current text. So if the text is Default and you don't have fonts which start with Default, it is completely normal the dropdown is empty. To check you should empty the font field and than all the available fonts will popup. Please test this, Dr Slony. If you start typing it will filter the list of fonts down to the partial font input.
Thanks for reporting this bug, please test if it is fixed for you from the latest bzr
$ bzr diff pyWx/lib/ popup.py' pyWx/lib/ popup.py 2009-06-23 14:43:21 +0000 pyWx/lib/ popup.py 2009-07-01 16:26:56 +0000
super( DictionaryFileC trl,self) .__init_ _(parent, value,size,
choices = choices, **extra)
=== modified file 'phatch/
--- phatch/
+++ phatch/
@@ -405,10 +405,10 @@
- def GetDefaultPath( self): GetValue( ) dirname( self.dictionary .get(value, value)) .get(value, value) self,default_ path=None) : GetValue( ) .get(value, value) yFileCtrl, self).GetDefaul tPath(default_ path)
- value = self.path.
- #default_path = os.path.
- default_path = self.dictionary
+ def GetDefaultPath(
+ if default_path is None:
+ value = self.path.
+ default_path = self.dictionary
return super(Dictionar
class AutoCompleteDic tionaryFileCtrl (DictionaryFile Ctrl):
@@ -426,10 +426,10 @@
_label = _t('Fonts')
_busy_cursor = True
- def GetDefaultPath( self): GetValue( ) dirname( font_dictionary ().get( value,value) ) ().get( value,value) self,default_ path=None) : GetValue( ) ().get( value,value) isdir(default_ path.strip( )): isdir(path) :
- value = self.path.
- #default_path = os.path.
- default_path = font_dictionary
+ def GetDefaultPath(
+ if default_path is None:
+ value = self.path.
+ default_path = font_dictionary
if not os.path.
for path in FONT_PATHS:
if os.path.
$ bzr commit -m "fix GetDefaultPath" 16gb/sync/ python/ phatch/ trunk/ pyWx/lib/ popup.py
Committing to: /media/
modified phatch/
Committed revision 930.