[Tkinter-discuss] Tkinter Class / Data passing

Cameron Laird Cameron at Phaseit.net
Fri Jul 23 18:55:44 CEST 2004


On Mon, Jul 19, 2004 at 07:17:44AM -0700, Faulconer, Steven M. wrote:
			.
			.
			.
> I have a program I've written that essentially acts as a graphical front-end
> to several in-house written command-line programs. The script is using
> Tkinter/Pmw as the interface language. The software works like this:
> 
> A user runs the script and is presented with an interface where they select
> a 'project' and a 'database'. The user clicks a button to accept those
> selections, which starts a new window. In this window is a number of Pmw
> group widgets containing a set of widgets for each command-line program (we
> call them 'checkers'). Each checker widget group has a button to run the
> checker software (command-line). This is redirected to a NEW Toplevel
> window. 
> 
> My question is, what is the best method for getting data out of this new
> Toplevel window? Meaning, this new Toplevel window has a set of buttons that
> allow the user to accept the software run, based on the output, or cancel
> the run (not accepting the run). The issue is, how do I tell the parent the
> outcome? I've tried creating a variable in the parent and setting it in
> various places in the child, but that doesn't seem to work. The value never
> changes. I've even tried using a global variable, but that still doesn't
> work.
> I debated attaching the code, but I think it will help with my issue.
> MainApp is the primary window that runs first. It starts a new CheckerApp
> window, which lists all the checkers, and starts a CheckerWindow when the
> user actually clicks the 'run checker' button in the checkerapp. How can I
> tell the CheckerApp, from within CheckerWindow, what button the user
> selected (accept/deny). 
> 
> I'm sure its obvious by my code, but I'm a new programmer, and the script is
> still unfinished. Constructive criticism is greatly appreciated. And please
> let me know if I did not explain the issue well enough. Thanks.
			.
			.
			.
Has no one answered Mr. Faulconer's question?  My impression is
that it's MUCH easier than he's making it, but I'm not in a po-
sition to address it any time soon.  I sure don't want him
thinking that we're unresponsive or that Tkinter is difficult,
both of which I know to be false, with occasional exceptions.
'Anyone comfortable with PMW have time for this?


More information about the Tkinter-discuss mailing list