Thanks. Updated. 

I'll try out the other method of passing $self, it might save me 
a global variable which I always hate.

Regards

Steve


-----Original Message-----
From: Johan Vromans [mailto:jvrom...@squirrel.nl] 
Sent: 19 August 2009 16:26
To: wxperl-users@perl.org
Subject: Re: Events, again.

"Steve Cookson" <steve.cook...@sca-uk.com> writes:

> http://wxperl.pvoice.org/w/index.php/Event_Handlers

Good job, Steve!

A couple of remarks.

For a 2-arg event handler, you can pass the full $self object with a
wrapper:

  Wx::Event::EVT_KILL_FOCUS($self->{field_1},
      sub { event_handler_sub( $self, @_ ) } );

Although the wxWidgets book is part of Bruce Perens' Open Source
Series, it is written by Julian Smart and Kevin Hock with Stefan
Csomor.

-- Johan

Reply via email to