> I just decided to take Win32-GUI for a test drive and
> tried the following sample.  It abortrf on the
> addlabel method.  I'm running on Win2000 and I've got
> the latest release of Win32-GUI I believe, release
> 0.0.558.  If I comment that line out it runs fine.

Labels and most controls seem to need a -name tag

The original code crashed on my system too... With this slight modification
it works fine for me.

JB

== Begin Perl Code ==
use Win32::GUI;
$main = Win32::GUI::Window->new(
        -name   => 'Main',
        -width  => 100,
        -height => 100,
);

$main->AddLabel(
        -text => "Hello, world",
        -name => HelloLbl     # HERE IS THE CHANGE
);

$main->Show();
Win32::GUI::Dialog();

sub Main_Terminate {
        -1;
}
== End Perl Code ==

Reply via email to