I read the solution for the RichEdit to generate Change
events at http://sourceforge.net/mailarchive/message.
php?msg_id=246228 (why doesn't that happen by
default, as documented?) but it ceases to work if I define
an onMouseDown or onMouseRightDown handler.
I do have some vague memory of this Change combined
with the on* issue being discussed on the mailing list but
Sourceforge's lame search capabilities did not turn out
anyhting useful, so I'm submitting a bug.
Hope that helps,
Dan Dascalescu
Code to reproduce the bug; note that onMouseRightDown simply needs to be there and doesn't need to be called for _Change not to work
Logged In: YES
user_id=674651
using any -onEVENT option turns on the NEM (New event model)
and turns off the OEM (Old event model). So specifying any
-onEVENT handler stops ALL old style event handlers being
called, and will call the handler you specify with the
-onEVENT option, for that event only.
If you really want both types of handler to be called, then
use the -eventmodel => 'both' option.
The fact that you need to set the event mask if down to
microsoft (although I agree that it might be better if
Win32::GUI did this for you). If you want something more
readable than
$richedit->SendMessage (0x445, 0, 1);
then use
$richedit->SetEventMask(ENM_CHANGE);
where ENM_CHANGE has the value 1.
Regards,
Rob.
Logged In: YES
user_id=674651
I've added some documentation to RichEdit to indicate that
the event mask may need to be set to get any events, and
documented the SetEventMask method.
In the fullness of time I will write up a tutorial page on
the use of NEM vs. OEM, and the fact that using any NEM
option disables OEM evnet handlers by default.