Tkinter Problem - NameError

O'Rourke Clodagh-corour01 corour01 at motorola.com
Wed Mar 21 04:08:40 EST 2001


> Hi all,
> 
I am creating a multi-windowed GUI system to put a front end on GSM network Environment Variables.  I have created a class to represent each window.  So there are these four windows classes.  AuditResync.py*   GuiSelection.py*  System.py* Cell.py*  InitialWin.py*   EnvVar.py*.  Alll of them except EnvVar just contain button boxes of selections to navigate through the application.  That is the application starts with InitialWin.py and the user selects a group of variables and a new window opens and the old one is destroyed.  

If I run python AuditResync.py the window appears perfectly.  On selection of the button which launchs an EnvVar window it runs perfectly again.  
If I run python InitialWin.py it window appears fine and on selection of the AuditResync button the same window as we displayed earlier appears fine too.  The problems arises on selection of the button which launchs an EnvVar window.  

Here I get the following NameError:

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 "AuditResync.py", line 64, in newAudit
    self.newEnvWin('audit')
  File "AuditResync.py", line 61, in newEnvWin
    EnvVar(g, self.parent)
NameError: EnvVar

Even though I was able to open an EnvVar Win from teh AuditResync window no problem earlier I could not understand why it would not open through the AuditResync window opened through the Initial win.
The same error happens a lot with all the classes.

> I would be very grateful if anyone could spot any possible errors.
> 
> Thanks a lot,
> Clodagh O' Rourke
> 




More information about the Python-list mailing list