Menu

#3 V 1.27a updated class vTextInCmd for X and Windows

open
nobody
None
5
2003-03-12
2003-03-12
No

I'm providing here an updated class vTextInCmd for both
X11 and Microsoft Windows versions of the V 1.27a
library. The changes are:

Both versions:
* The message entered in the text command can now be
any length, limited by the underlying platform (the
default for Win32 is 32K characters.)
* GetTextIn will retrieve only the "maxlen" characters
from the text, no matter how long the actual text in
the control is.
* New member GetTextInLength provides the length
currently in the text control. This can be used to
allocate a buffer of sufficient length for GetTextIn.

X11 version:
* Now has callbacks for (1) text change, and (2)
leaving focus. This matches the Windows version.

I've tested these on MS Windows 2000 and X11R6
(XFree86), and lesstif (0.93). (I have not tested the
Athena build, but the code is there. Anyone want to try
it to be sure the callbacks work ok?)

---------
I've provided these files in a zip archive. unzip with
the "-aa" option to your native text file format.

Rather than provide diff files for patch, these are the
complete files; changes to the source were extensive.

Discussion

  • Tom Hilinski

    Tom Hilinski - 2003-03-12

    Logged In: YES
    user_id=446309

    The file upload didn't happen above - I'll try again here.

     
  • Tom Hilinski

    Tom Hilinski - 2003-03-12
     
  • Tom Hilinski

    Tom Hilinski - 2003-03-13

    Updated Windows files for class vTextInCmd.

     
  • Tom Hilinski

    Tom Hilinski - 2003-03-13

    Logged In: YES
    user_id=446309

    Sadly, my patch needs a patch, for the Windows version,
    anyway. Turns out the lifetime of the HWND for the text
    control is less than the class instance lifetime, so
    GetTextIn may not have gotten the text before the HWND is
    released. The attached class files seem to work in all my
    tests now. Please let me know if anymore issues appear. My
    apologies for any inconvenience.... Tom

     

Log in to post a comment.

MongoDB Logo MongoDB