cjprecord / editra-plugins

Automatically exported from code.google.com/p/editra-plugins
0 stars 0 forks source link

Config Dialog Error on Windows #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Click on button to open config dialog for first time
2.
3.

What is the expected output? What do you see instead?

Did some testing today on windows and got the following error.

The traceback is from a KeyError, not sure why it only happens on Windows.

*** Sun Oct 14 04:09:29 2007 ***
Traceback (most recent call last):
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ProjectP
ane.py",
line 1586, in OnPress
    cfg = ConfigDialog.ConfigDialog(self, self.ID_CFGDLG, self.projects.config)
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 38, in __init__
    self._notebook = ConfigNotebook(self, -1, data)
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 71, in __init__
    self.AddPage(SourceControlConfigTab(self, -1, data), _("Source Control"))
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 241, in __init__
    self.populateSystemOptions()
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 260, in populateSystemOptions
    self.populateRepositoryList()
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 293, in populateRepositoryList
    sorted([x for x in self._data.getSCRepositories(sc).keys() if x !=
'Default']) + \
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 558, in getSCRepositories
    return self.getSCSystem(sc)['repositories']
  File "c:\documents and
settings\codeman\desktop\editra\plugins\projects-0.1-py2.5.egg\projects\ConfigDi
alog.py",
line 539, in getSCSystem
    return self['source-control'][name]
KeyError: u''

Original issue reported on code.google.com by CodyPrec...@gmail.com on 14 Oct 2007 at 9:44

GoogleCodeExporter commented 9 years ago
I pushed a change to make sure that blanks don't get into the repository list, 
but I'm still not sure how this is 
happening.  I'll leave this defect open until I hear from you.

Original comment by Kevin.Da...@gmail.com on 15 Oct 2007 at 2:58

GoogleCodeExporter commented 9 years ago
Those changes unfortunately didn't help but I found the cause and checked in a 
fix.

It seems that on Windows that Choice controls need to have a selection 
explicitly set
where as on osx it defaults to the first item when no call to set is done. This 
was
what caused the currentSystem property to return '' when the dialog is first 
created
causing the key error.

As part of this I also fixed a number of small UI issues so that the dialog 
works and
looks good on all platforms mac/gtk/msw.

Original comment by CodyPrec...@gmail.com on 16 Oct 2007 at 12:19

GoogleCodeExporter commented 9 years ago

Original comment by CodyPrec...@gmail.com on 22 Jan 2008 at 8:37