Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#41 RichEdit_Change doesn't work with onMouseDown

closed-wont-fix
Robert May
None
1
2005-11-22
2005-07-22
Dan Dascalescu
No

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

Discussion

  • Dan Dascalescu
    Dan Dascalescu
    2005-07-22

    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

     
    Attachments
  • Robert May
    Robert May
    2005-07-22

    • priority: 5 --> 1
     
  • Robert May
    Robert May
    2005-07-22

    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.

     
  • Robert May
    Robert May
    2005-08-04

    • priority: 1 --> 2
    • assigned_to: nobody --> robertemay
     
  • Robert May
    Robert May
    2005-10-04

    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.

     
  • Robert May
    Robert May
    2005-10-04

    • priority: 2 --> 1
    • status: open --> open-wont-fix
     
  • Robert May
    Robert May
    2005-11-22

    • status: open-wont-fix --> closed-wont-fix