I have a library that I import that has some utility classes in it.
One of them is a dOkCancelDialog for a database connection. It is
saved as a cdxml file. So, now problem I thought. Well, in the file
where I have my dApp class, I call "import bos" to import the library
and the utility classes. In the __init__.py file for the module, I
have the following code:
from dabo.lib.DesignerXmlConverter import DesignerXmlConverter as dxc
import os
ConnectionPanel =
dxc().classFromXml(os.path.join(os.path.split(__file__)[0],
"ConnectionPanel.cdxml"))
When the init file runs, the dabo app object is not defined. I think
this is not a problem as I am just creating the class and I should
only have to worry about the app object during instantiation. Boy was
I wrong. However, I get the following error:
Traceback (most recent call last):
File "PartManager.py", line 11, in <module>
from PartManagerApp import PartManagerApp
File "c:\Documents and Settings\nwlowri\My Documents\Projects\Personal\lbss-fu
ll\Part Manager\trunk\PartManagerApp.py", line 9, in <module>
import bos
File "c:\Python25\lib\site-packages\BOS\trunk\bos\__init__.py", line 1, in <mo
dule>
import ui
File "c:\Python25\lib\site-packages\BOS\trunk\bos\ui\__init__.py", line 1, in
<module>
import db
File "c:\Python25\lib\site-packages\BOS\trunk\bos\ui\db\__init__.py", line 2,
in <module>
from ConnectionDialog import ConnectionDialog, ConnectionPanel
File "c:\Python25\lib\site-packages\BOS\trunk\bos\ui\db\ConnectionDialog.py",
line 6, in <module>
ConnectionPanel = dxc().classFromXml(os.path.join(os.path.split(__file__)[0]
, "ConnectionPanel.cdxml"))
File "C:\Python25\lib\site-packages\dabo-full\trunk\dabo\lib\DesignerXmlConver
ter.py", line 26, in __init__
super(DesignerXmlConverter, self).__init__(*args, **kwargs)
File "C:\Python25\lib\site-packages\dabo-full\trunk\dabo\dObject.py", line 88,
in __init__
self._afterInit()
File "C:\Python25\lib\site-packages\dabo-full\trunk\dabo\dObject.py", line 182
, in _afterInit
self.afterInit()
File "C:\Python25\lib\site-packages\dabo-full\trunk\dabo\lib\DesignerXmlConver
ter.py", line 39, in afterInit
self._classFileName = self.Application.getTempFile("py")
AttributeError: 'NoneType' object has no attribute 'getTempFile'
Seems like the solution lies in moving the TempFileHolder object
creation out of dApp. Ed or Paul, if you have a suggestion on
implementation and let me know, I'll make the changes.
Nate L.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]