I'm working with Tk again creating a GUI, and decided the Tk::NoteBook was what I needed. However, it's giving me some problems. For one, I get Tk::Button=Hash(hex#) is not a Tk Object ... and also, Tk::Error: Unkown tab "page0" (several times).
I get the latter one just by including an $notebook->add('something', options) statement (which the docs say is how you get a tab).
Here's the relavent portion, thanks for any help ...
my $nb = $mw->NoteBook->grid;
for(0..$num-1) {
my $page = $nb->add("Page$_", -text => "Name$_");
my $ne = $page->Entry(
-textvariable => \$info->[$_]->{name},
);
my $ie = $page->Entry(
-textvariable => \$info->[$_]->{index},
);
my $pom = $page->Optionmenu(
-variable => \$info->[$_]->{parser},
-options => [@parsers],
);
my $gom = $page->Optionmenu(
-variable => \$info->[$_]->{graph},
-options => [@graphs],
);
my $rcb = $page->Checkbutton(
-text => 'Rare Event',
-variable => \$info->[$_]->{rareevent},
);
my $dom = $page->Optionmenu(
-variable => \$info->[$_]->{subdir},
-options => [@subdirs],
);
my $fom = $page->Optionmenu(
-variable => \$info->[$_]->{file},
-options => get_files($info->[$_]->{subdir}),
);
my $b = $page->Button(
-text => 'Set',
-command => [\&record, {}],
);
my @grid = ();
if($name) { push @grid, \$ne}
if($index) { push @grid, \$ie}
if($parser) { push @grid, \$pom}
if($graph) { push @grid, \$gom}
if($rareevent) { push @grid, \$rcb}
push @grid, (\$dom, \$fom, \$b);
my $first = shift @grid;
my $args = join(',', @grid);
$$first->grid( eval $args );