Re: Win32::GUI crashing, burning -- fixed!

2003-10-08 Thread Eric Hillman
Tobias Hoellrich wrote:
> Try naming all your gui-objects and it'll do wonders:
> 
> $main->AddLabel(-text => $text, -name => "foobar");
> 
> HTH
>   Tobias
 
 
 Yay!  Thanks a million.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::GUI crashing, burning.

2003-10-08 Thread Tobias Hoellrich
Try naming all your gui-objects and it'll do wonders:

$main->AddLabel(-text => $text, -name => "foobar");

HTH
  Tobias

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Eric Hillman
> Sent: Wednesday, October 08, 2003 4:56 PM
> To: Perl-Win32
> Subject: Win32::GUI crashing, burning.
> 
> 
> Weird problem here...  I've been trying to move to Win32::GUI
> from Tk, and I can't even get as far as "Hello World" without 
> perl crashing with a "Perl.exe generated errors and will be 
> closed by Windows" Dr. Watson popup.
> 
> The error I'm getting happens when I try to add pretty much
> any widget. For example, right now I'm trying to do something like:
> 
> my $text = "Hello World";
> $main->AddLabel(-text => $text);
> 
> Looking at it with the debugger, it appears that the error
> occurs as I'm going through 
> Win32::GUI::WindowProps->FETCH($self, $key), with $key = 
> "-font".  Going by the tutorials I'm reading, there ought to 
> be a default value, but perl crashes on FETCH returning Undef.
> 
> Even weirder, when I defined a font, it died trying to
> process $key = "-handle", which went through just fine before 
> -- it doesn't even get as far as -font.
> 
> The only thing I could think of is maybe it had something to
> do with the fact that I had Cygwin's perl on this box as 
> well, so I uninstalled that, and reinstalled the Win32::GUI 
> module.  Still no dice.
> 
> Any ideas?  Am I missing something important here?
> 
> --
> Eric Hillman
> Sr System Administrator
> Balogh Becker, LTD.
> 
> 
> here's the code:
> 
> 
> use strict;
> use Win32::GUI;
> use vars qw( $main );
> 
> 
> $main = Win32::GUI::Window->new(-name => 'Main', -text => 'Perl',
> -width => 200, -height => 200);
> 
> my $text = "Hello World";
> my $textfont = Win32::GUI::Font->new(-name => "Comic Sans MS",
>  -size => 24);
> $main->AddLabel(-text => $text,  # <- If I comment this out,
> -font => $textfont); #the program works.
> $main->Show();
> Win32::GUI::Dialog( );
> 
> 
> sub Main_Terminate {
> -1;
> }
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Win32::GUI crashing, burning.

2003-10-08 Thread Eric Hillman
Weird problem here...  I've been trying to move to Win32::GUI from Tk,
and I can't even get as far as "Hello World" without perl crashing with
a "Perl.exe generated errors and will be closed by Windows" Dr. Watson
popup.

The error I'm getting happens when I try to add pretty much any widget.
For example, right now I'm trying to do something like:

my $text = "Hello World";
$main->AddLabel(-text => $text);

Looking at it with the debugger, it appears that the error occurs as I'm
going through Win32::GUI::WindowProps->FETCH($self, $key), with $key =
"-font".  Going by the tutorials I'm reading, there ought to be a
default value, but perl crashes on FETCH returning Undef.

Even weirder, when I defined a font, it died trying to process $key =
"-handle", which went through just fine before -- it doesn't even get as
far as -font.

The only thing I could think of is maybe it had something to do with the
fact that I had Cygwin's perl on this box as well, so I uninstalled
that, and reinstalled the Win32::GUI module.  Still no dice.

Any ideas?  Am I missing something important here?

--
Eric Hillman
Sr System Administrator
Balogh Becker, LTD.


here's the code:


use strict;
use Win32::GUI;
use vars qw( $main );


$main = Win32::GUI::Window->new(-name => 'Main', -text => 'Perl',
-width => 200, -height => 200);

my $text = "Hello World";
my $textfont = Win32::GUI::Font->new(-name => "Comic Sans MS",
 -size => 24);
$main->AddLabel(-text => $text,  # <- If I comment this out,
-font => $textfont); #the program works.
$main->Show();
Win32::GUI::Dialog( );


sub Main_Terminate {
-1;
}

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs