|
From: <bra...@om...> - 2005-05-13 21:55:22
|
Alex Tweedly wrote on 05/12/2005 07:28:24 PM:
>
> Apologies if this is a dumb question, but I'm not sure how best to
> handle this error condition.
>
> I discovered that if you start a Pythoncard script when the main
> script's resource file is missing, you get an error condition; the code
> in model.py/internationalResourceName() assumes that there will be at
> least one matching resource file.When there isn't, it tried to use an
> un-initialized variable .... clearly not the right thing to do.
>
> It's easy enough to detect the situation - but what should we then do ?
I'm seeing this error when I launch the new Resource Editor .3, even
though
it clearly does have a Resource File.
Here is the traceback:
Traceback (most recent call last):
File
"//Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/wx-2.6-mac-unicode/wx/_core.py",
line 11904, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "resourceEditor.py", line 168, in on_initialize
self.propertyEditorWindow = model.childWindow(self, PropertyEditor)
File "/OMS/dev/pythonPackages/PythonCard/model.py", line 208, in
childWindow
filename = internationalResourceName(base)
File "/OMS/dev/pythonPackages/PythonCard/model.py", line 178, in
internationalResourceName
return filename
UnboundLocalError: local variable 'filename' referenced before assignment
|