Soko has asked for the wisdom of the Perl Monks concerning the following question:
In each of the subroutines, widgets are created with private variables, as is normal (and good coding style, I think). The issue I have is accessing the child widgets in the Notebook pages. Here's another code snippet from customersBillAddr_ui:use Tk::NoteBook; $notebook = $frmNotebook->NoteBook()->pack(); my $billTab = $notebook->add('Bill', -label => 'Billing'); my $shipTab = $notebook->add('Ship', -label => 'Shipping'); my $acctTab = $notebook->add('Acct', -label => 'Accounting'); my $notesTab = $notebook->add('Notes', -label => 'Notes'); my $invoiceTab = $notebook->add('Invoicing', -label => 'Invoicing' +); #put widgets into the notebook tabs... &customersBillAddr_ui($billTab); &customersShipAddr_ui($shipTab); &customersAccounting_ui($acctTab); &customersNotes_ui($notesTab); &customersInvoice_ui($invoiceTab);
How does one get at $mnuTerms without making it global? What am I missing?my $mnuTerms = $root->BrowseEntry ( -textvariable => \$cust->{'terms'}, -state => 'readonly', -choices => \@items, );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Tk::Notebook and scope
by hawtin (Prior) on Sep 21, 2003 at 08:33 UTC | |
Re: Tk::Notebook and scope
by jdtoronto (Prior) on Sep 21, 2003 at 03:16 UTC | |
Re: Tk::Notebook and scope
by kvale (Monsignor) on Sep 21, 2003 at 02:24 UTC | |
Re: Tk::Notebook and scope
by graff (Chancellor) on Sep 21, 2003 at 02:53 UTC | |
Re: Tk::Notebook and scope
by blssu (Pilgrim) on Sep 23, 2003 at 15:18 UTC |