> Thinking about it, it would be nice to be able to do this:
>
> $mw->btButton->Change(-events => {Click => sub {return -1}});

There's nothing wrong with the concept and the implementation might actually
be pretty simple (all I think it needs is to bitwise-OR in the constant that
says "yes, capture clicks" to the NEM event mask).

It's on the todo list.

Steve

----- Original Message ----- 
From: "Glenn W Munroe" <[EMAIL PROTECTED]>
To: "'Stephen Pick'" <[EMAIL PROTECTED]>
Cc: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Tuesday, January 20, 2004 8:03 PM
Subject: RE: [perl-win32-gui-users] Accelerator bug?


>
> It sounds like the NEM is the way to go, then. Accordingly, I've added
> non-functioning accelerators to the Tracker as a bug (though I suppose
> it could have been a feature request according to Glenn Linderman's
> reply).
>
> Thinking about it, it would be nice to be able to do this:
>
> $mw->btButton->Change(-events => {Click => sub {return -1}});
>
> but it doesn't seem to work. Is there something fundamentally wrong with
> the idea, or has it just not been implemented (yet)?
>
> Glenn Munroe
>
> -----Original Message-----
> From: Stephen Pick [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 20 January, 2004 07:59
> To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.sourceforge.net
> Subject: RE: [perl-win32-gui-users] Accelerator bug?
>
> Yes, I use the NEM heavilly. The OEM is a really ugly way of doing
> things and basing things on references is much safer and much more
> elegant. Every other perl module that needs to do callbacks uses
> references (see.. well.. anything, err, LWP for example). This is
> because you can check that references are safe to call, whereas with
> non-references you have to eval() and then you open up security holes.
>
> Steve
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of
> > Glenn W Munroe
> > Sent: 20 January 2004 10:52
> > To: perl-win32-gui-users@lists.sourceforge.net
> > Subject: RE: [perl-win32-gui-users] Accelerator bug?
> >
> >
> >
> > Just out of interest, is anybody really using the NEM? Are there any
> > major advantages to it? I admit it is quite elegant to have a one-line
> > subroutine defined as an -event option, but in practice, most event
> > handlers will consist of more code than I would like to
> > define that way
> > and the handler would just end up being another subroutine call.
> >
> > IMHO, the two major advances in this module recently have been
> > accelerators and hooks (I'd say we're approaching GUI
> > nirvana), so if at
> > least one of them doesn't work in NEM, that knocks it on the head for
> > me.
> >
> > Glenn
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > Glenn Linderman
> > Sent: Monday, 19 January, 2004 21:52
> > To: [EMAIL PROTECTED]
> > Cc: perl-win32-gui-users@lists.sourceforge.net
> > Subject: Re: [perl-win32-gui-users] Accelerator bug?
> >
> > Glenn,
> >
> > Sorry for the delay, I was not monitoring this email address
> > from 1/15
> > until now.
> >
> >
> > On approximately 1/16/2004 8:28 AM, came the following characters from
> > the keyboard of Glenn W Munroe:
> > > Glenn,
> > >
> > > I haven't really used the NEM much yet, but when I knocked
> > up a small
> > > test script this morning with the new model I found that
> > accelerators
> > > didn't work. Had you noticed this or can you confirm it? If
> > so, is it
> > a
> > > bug with accelerators themselves or some underlying "feature" of the
> > > system?
> >
> > Indeed, I think it is just a missing feature in NEM.  When I
> > looked at
> > the code inside Win32::GUI for accelerators, I was able to figure out
> > and fix accelerators for OEM, but I think NEM has much more code that
> > simply isn't there for accelerators.  This is one reason I am still
> > using OEM.  (OEM = Old Event Model, when it takes a break
> > from meaning
> > Original Equipment Manufacturer :) )
> >
> > > Regards,
> > > Glenn Munroe
> >
> > -- 
> > Glenn -- http://nevcal.com/
> > ===========================
> > The best part about procrastination is that you are never bored,
> > because you have all kinds of things that you should be doing.
> >
> >
> >
> > -------------------------------------------------------
> > The SF.Net email is sponsored by EclipseCon 2004
> > Premiere Conference on Open Tools Development and Integration
> > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> > http://www.eclipsecon.org/osdn
> > _______________________________________________
> > Perl-Win32-GUI-Users mailing list
> > Perl-Win32-GUI-Users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > The SF.Net email is sponsored by EclipseCon 2004
> > Premiere Conference on Open Tools Development and Integration
> > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> > http://www.eclipsecon.org/osdn
> > _______________________________________________
> > Perl-Win32-GUI-Users mailing list
> > Perl-Win32-GUI-Users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> >
>
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>


Reply via email to