That gets me closer, but now that makes my $blah1 variable: Win::32::GUI::Textfield=HASH(01Xc2c35b). I am not sure why this is.
| [reply] |
use strict;
use warnings;
use Win32::GUI;
use Data::Dumper; $Data::Dumper::Useqq = 1; $| = 1;
my $main = Win32::GUI::Window->new(
-title => 'application',
-name => 'Main',
-width => 400,
-height => 200,
-dialogui => 1,
);
my $urlfield = $main->AddTextfield(
-name => 'urlfield',
-text => '',
-left => 10,
-top => 10,
-width => 200,
-height => 25,
-prompt => ['URL:', 80],
-tabstop => 1,
);
$main->AddButton(
-name => 'BOK',
-text => 'GO!',
-pos => [148,125],
-tabstop => 1,
-ok => 1,
-onClick => sub {
# Either of these work:
my $text = $urlfield->Text();
# my $text = $main->urlfield->Text();
SUBMIT( $text );
return 1;
},
);
$urlfield->SetFocus();
$main->Show();
Win32::GUI::Dialog();
sub SUBMIT {
my ($submitted_url) = @_;
print Dumper $submitted_url;
}
sub Main_Terminate {
# -1 = Stop message loop and finish program
return -1;
}
| [reply] [d/l] [select] |