*** Whoops, forgot to copy list!

It's true some event types are not wrapped.  The approach historically has
been to post exceptions here and someone will wrap them.  Sometimes you need
to use Wx::wxEVT_SOMETHING.

Why don't you post the ones that don't work here?

Regards

Steve

On 26 May 2013 01:23, "Helen Craigman" <ga0...@gmail.com> wrote:



In wxPerl, many cases, this doesn't work, since (in those cases) the
constant
wxEVT_SOMETHING is not exported for event EVT_SOMETHING.
 
An "EVT_SOMETHING.typeId" functionality (or EVT_SOMETHING->typeId(),
or EVT_SOMETHING->{typeId} ), enables you to obtain the event type
even when wxEVT_SOMETHING is not exported.

----- Original Message ----- 
From: steveco.1...@gmail.com 
To: 'Helen Craigman' <mailto:ga0...@gmail.com>  ; 'wxperl-users'
<mailto:wxperl-users@perl.org>  
Sent: Sunday, 26 May, 2013 0:54
Subject: RE: How to find the event type in wxPerl?

Eg if ($event->GetEventType == wxEVT_COMMAND_BUTTON_CLICKED) {
 
    Do some stuff.
 
}

  _____  

From: Helen Craigman Sent: 25 May 2013 17:55
To: wxperl-users Subject: How to find the event type in wxPerl?

Dear wxPerl experts
 
In wxPython, you can find an event type by calling a method (or property?)
"typeId".
See examples below.
It seems that there is no such functionality in wxPerl (maybe since
"EVT_SOMETHING"
in wxPerl encapsulates the call to the event binder, while in wxPython,
 "EVT_SOMETHING" is a lower-level subroutine?)
Finding the event type enables you to mimic (or artificially trigger) a
widget command event.
This is sometimes necessary, for testing purposes and other programmatic
purposes.
(It's necessary in order to mimic existing events, not only for custom,
user-defined events).
Is there a way to get the EVT_SOMETHING.typeId functionality in wxPerl?
Many TIA
Helen
--------------------------------
Examples: 
1. 
> event = wx.CommandEvent(self.EVT_TEXT_CHANGED.typeId, self.Id)
(in: https://svn.ceon.pl/research/SegmEdit/SegmEditGUI/controls.py)
2. 
> printevent = wx.PyCommandEvent(EVT_PRINT_MESSAGE.typeId, ID_PRINT_MESSAGE)
(line 113 in: 
http://nullege.com/codes/show/src@p@y@python-irc-h...@pyrc.py/113/wx.PyComma
ndEvent)
3. 
> if evt and (renewOverlay or evt.GetEventType() == wx.EVT_SIZE.typeId):
(line 150 in: 
www.seismic-handler.org/browser/SHX/trunk/sandbox/traceplotter.py?rev=414)
and many others.

Reply via email to