Access Issues
Benoit Dupire
bdupire at seatech.fau.edu
Wed Mar 21 09:35:01 EST 2001
O'Rourke Clodagh-corour01 wrote:
> Hi all,
>
> I wonder if anyone can help.
>
> I am trying call the constructor of the EnvVar class from the newEnvWin function of the Cell class.
> But I am getting the following error
>
> Exception in Tkinter callback
> Traceback (innermost last):
> File "/usr/vob/omc_reference/ThirdParty/scriptSources/lib/python1.5/lib-tk/Tkinter.py", line 764, in __call__
> return apply(self.func, args)
> File "Cell.py", line 63, in newCellMgt
> self.newEnvWin('cellmgt')
> File "Cell.py", line 60, in newEnvWin
> instance = EnvVar.__init__(g, self.parent)
> AttributeError: __init__
>
your pb seems a namescope pb: try
#Cell.py
<snip>
def newEnvWin(self, g):
newParent = Toplevel()
instance = Envar.EnvVar(g, self.parent)
>
> I have include some extracts of the code.
> Thank you,
> Clodagh.
>
> **********************************************
> import EnvVar, GuiSelection, AuditResync, System
> from shellgui import EnvVarSite
> import Pmw
> from Tkinter import *
>
> class Cell(EnvVarSite):
> def __init__(self, parent=None, **kw):
> ......
>
> def newCellMgt(self):
> self.newEnvWin('cellmgt')
>
> def newEnvWin(self, g):
> newParent = Toplevel()
> instance = EnvVar.__init__(g, self.parent)
>
> ********************************************
>
> import informixdb, os, sys, string, Pmw
> from Tkinter import *
> from shellgui import EnvVarSite
> import GuiSelection, AuditResync, Cell, System
>
> class EnvVar(EnvVarSite):
>
> def __init__(self, g, parent=None):
> self.sels = None
> self.parent = parent
> self.group = g
> self.edit = 1
> self.GetDBValues()
> EnvVarSite.__init__(self,parent)
>
> ************************************************
More information about the Python-list
mailing list