sub doFileImportUi { my ($pg, $dbh) = @_; $pg->Label(-text => 'File', -width => '10')->grid( $pg->LabEntry(-width => '30', -textvariable => \$state->{ImpFile}), $pg->Button(-text => 'Browse', -command => [ \&getImportFile, $pg, $dbh], -width => '10')); $pg->Label(-text => 'DataSource', -justify => 'right', -width => '20') ->grid(my $ds_list = $pg->BrowseEntry(-variable => \$state->{dsSrcName}, -browsecmd => \&doGetDatasource, -listcmd => [ \&doLoadDs, $pg, $dbh ], -width => '20'), -sticky => 'w'); my $gbtn = $pg->Button(-text => 'Next Phase')->grid(); $gbtn->configure( -command => [ \&doImportFile, $pg, $dbh, $gbtn ]); my @listname = &doLoadDs($pg, $dbh); $ds_list->insert('end', @listname); }