From: Robert M. <rob...@us...> - 2007-11-10 11:53:12
|
On 26/09/2007, Glenn Linderman <pe...@ne...> wrote: > The following script can count, but nothing appears in the StatusBar > itself... I can't immediately work out how to put anything into the status bar when it's in simple mode. I'm sure I've done it before, but can't find anything right now. > In looking at StatusBar.xs, I find that StatusBar_onParseOption seems to > have mismatched } ... like there might be a missing { after the if. In > fact, it looks like there might be missing () around the if clause too. > Makes me wonder if this code actually is included in GUI. I see you've discoveded the macro-hell that expands this code to compile OK! Here's a version that works: #!perl use strict; use warnings; use Win32::GUI(); my $foo = 0; my $mw = Win32::GUI::Window->new( -size => [200, 200], ); my $sb = $mw->AddStatusBar( -text => "Initial Text", -onClick => sub { $_[0]->Text('Foo: ' . $foo++); 0; }, ); $mw->Show(); Win32::GUI::Dialog(); __END__ Regards, Rob. |