While I'm an avid user fo Win32::GUI, I don't know
much about the internals... That being said, it does
seem more intuitive to be able to assign callbacks to
specific timers (as opposed to setting up a switch
type dispatcher based on the timer name.)  Basically,
it would be like having an -onclick type property for
the timer...

-Ariel

--- Robert May <[EMAIL PROTECTED]> wrote:

> Ñåðãåé ×åðíèåíêî wrote:
> [ snipped timer-related stuff ]
> > And does it mean that OEM
> > and NEM can not be mixed?
> 
> By default a window/control uses the Original/Old
> Event Model (OEM), 
> where the sub that is called is the -name of the
> window/control followed 
> by '_' followed by the event name itself. (So for a
> control with -name 
> => 'ABC', the click event sub is ABC_Click.  This
> sub must be located in 
> package main (the default package).
> 
> As soon as any New Event Model (NEM) option is given
> to the constructor, 
> Win32::GUI turns off all OEM subroutine calls. 
> Using NEM allows us to 
> use any sub name we want, from any package.  We can
> event use anonymous 
> subs.
> 
> If you really want to have both OEM and NEM
> callbacks existing at the 
> same time, then you can pass -eventmodel => 'both'
> to the 
> window/control's constructor (other allowed values
> are 'byname' to force 
> OEM, and 'byref' to force NEM).  If you have both
> event models enabled, 
> then currently the NEM sub gets called first (but
> don't rely on this 
> behaviour)
> 
> Personally I find it very confusing having both
> enabled, and I would 
> consider it 'best practice' to use one or the other.
>  The NEM is far 
> more powerful (and essential if you want to put
> different bits of your 
> UI code into different packages), but I can see how
> anyone coming from 
> VB would find the OEM more understandable.
> 
> Hope this s useful.
> 
> Rob.
> 
> 
>
-------------------------------------------------------
> SF.Net email is Sponsored by the Better Software
> Conference & EXPO
> September 19-22, 2005 * San Francisco, CA *
> Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects
> & Teams * Testing & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> 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