My 2 cents worth. I *really* like this approach. The idea of one handler is
much cleaner and simpler, especially when you have many items in the table.
Going one step further I'd like to see the same kind of approach taken for
menus!

cheers,

jez.

----- Original Message ----- 
From: "Laurent ROCHER" <[EMAIL PROTECTED]>
To: "Win32 GUI Hackers" <perl-win32-gui-hackers@lists.sourceforge.net>
Sent: Sunday, March 28, 2004 8:56 PM
Subject: Re: [perl-win32-gui-hackers] New Win32::GUI code in MAIN CVS.


> Hi,
>
> Some small bug fix :
>     - UpDown :
>         + Fix Scroll event.
>     - GUI_Events.cpp :
>         + In DoEvent_* functions : PERLWIN32GUI_EVENTHANDLING is set after
> event call.
>
> I looking for NEM support for accelerator and i don't know if my current
> implementation was good.
> If you look in sample below, you see it's always call -onClick window
event
> with accelerator name but not call button click event like in OEM.
> For NEM support it's probably nicer to call Button click method like OEM
do.
> What do you think ?
>
> Laurent.
>
> use Win32::GUI;
>
> my $acc = new Win32::GUI::AcceleratorTable(
>  "A" => "Window",
>  "B" => "Button",
> );
>
> $W = new Win32::GUI::Window(
>     -name   => "Window",
>     -title  => "test",
>     -pos    => [100, 100],
>     -size   => [280, 280],
>     -accel  => $acc,
>     # NEM call comment for OEM.
>     -onClick => sub { my ($self, $name) = @_; print "Window OnClick :
> $name\n"; },
> );
>
> $W->AddButton(
>     -name    => "Button",
>     -pos     => [5,  5],
>     -size    => [100, 100],
>     -text    => "Just button",
> );
>
> $W->Show;
> Win32::GUI::Dialog();
>
> # OEM call
> sub Window_Click {
>   print "Window_Click\n";
> }
>
> sub Button_Click {
>   print "Button_Click\n";
> }
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Perl-Win32-GUI-Hackers mailing list
> Perl-Win32-GUI-Hackers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers


Reply via email to