On Mon, 2009-08-10 at 13:56 -0300, Steve Cookson wrote:
> Hi Eric,
>  
> Do you know of any documentation on Event Types and unpicking the
> variables passed 
> as part of the event?

Have you already checked out wxWidgets' docs?
http://docs.wxwidgets.org/trunk/overview_events.html
http://docs.wxwidgets.org/trunk/classwx_event.html


Andri

> 
> ______________________________________________________________________
> From: Steve Cookson [mailto:steve.cook...@sca-uk.com] 
> Sent: 10 August 2009 11:24
> To: 'Steve Cookson'; wxperl-users@perl.org
> Subject: RE: Distinguishing between event types
> 
> 
> 
> My mistake,  I was using wxEVT_COMMAND_KILL_FOCUS, when I should have
> used wxEVT_KILL_FOCUS.
>  
> Regards
> 
> Steve
>  
> 
> 
> ______________________________________________________________________
> From: Steve Cookson [mailto:steve.cook...@sca-uk.com] 
> Sent: 10 August 2009 09:02
> To: wxperl-users@perl.org
> Subject: FW: Distinguishing between event types
> 
> 
> 
> OK I'm making some progress. The event passes $self and $event
> to the subroutine.
>  
> So I can use a handler that looks like this:
> sub __called_by_events {
> 
> if ($event->GetEventType()=wxEVT_COMMAND_BUTTON_CLICKED) {
> 
> do this_processing();
> 
> }
> 
> But then I want to find out which control was clicked so I use
> $self->GetId() and I get "-205".  What is this?
> 
> And there are other event codes like 10114, when I expected
> wxEVT_COMMAND_KILL_FOCUS - 10202.
> 
> Where can I find a table that tells me what 10114 and other codes are?
> 
> Have a good day.
> 
> 
> Regards
> 
> Steve
>  
> 
> 
> ______________________________________________________________________
> From: Steve Cookson [mailto:steve.cook...@sca-uk.com] 
> Sent: 10 August 2009 00:16
> To: wxperl-users@perl.org
> Subject: Distinguishing between event types
> 
> 
> 
> Hi,
> 
> I have a number of events that call the same subroutine.  The events
> may 
> 
> be a mixture of button events or lose focus events and I need to
> process
> 
> differently depending on which event it is.
> 
> Eg, A search button is the same a change value of text field and exit
> (loose
> 
> focus).  But if the whole screen has lost focus because another
> application
> 
> has been clicked on nothing happens.
> 
> Ie in pseudo code:
> 
> sub __called_by_events {
> 
> if ((loose focus for field and not loose focus window) or press
> button) 
> 
>     {do something}
> 
> return;
> 
> }
> 
> But its not clear to me what methods work for both focus events and
> button events
> 
> without getting an 'undefined' error. Also I'm struggling with the
> syntax.
> 
> Regards
> 
> Steve
> 
>  

Reply via email to