lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Input-sequence editor testing


From: Václav Slavík
Subject: Re: [lmi] Input-sequence editor testing
Date: Sun, 26 Jun 2011 17:01:07 +0200

Hi,

On 24 Jun 2011, at 15:39, Greg Chicares wrote:
> More precisely, the default parameter is NULL, but the documentation:
>  
> http://docs.wxwidgets.org/trunk/classwx_evt_handler.html#78719e8b82c9f9c6e4056b3449df1943
> says "If it is omitted, this is used". And the wx-2.9 documentation:
>  
> http://docs.wxwidgets.org/2.9/classwx_evt_handler.html#1e8b5fc4c7e7f6d32d40bc00d4108ba4
> seems the same, so I'm guessing that this change isn't required for
> wx-2.9.2 compatibility. I suppose the documentation means that wx
> detects the NULL default and uses 'this' instead in that case. But I
> still don't understand why we can't just omit it.

The 'this' in the documentation is the instance whose wxEvtHandler::Connect() 
is called, i.e. 'object' in ::Connect<> from wx_utility.hpp. In other words, an 
event is sent to the object itself by default.

In the code snippet you quoted, where ::Connect(value_ctrl, ..., this); is 
called, 'this' is an instance of InputSequenceEditor that is the parent of 
'value_ctrl' and we want to send the event to the former, while the default is 
to send it to 'value_ctrl'.

Regards,
Vaclav 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]