Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
I'm having problems with events, event queue processing, and X$LOOKUP_STRING. Can anyone offer me (a novice X user) some advice? I put together two tests, but can't seem to get the 2nd one to work properly. Test 1 works great, but Test 2 does not... ---------------------------------------------------------------------------- Test 1: I. Call X$SELECT_ASYNC_INPUT to specify the name of an AST routine that I want called when events occur. II. AST routine: A. Call X$NEXT_EVENT to pull event off queue B. If event is a key press, call X$LOOKUP_STRING to translate key event ---------------------------------------------------------------------------- Test 2: I. Call X$SELECT_ASYNC_INPUT to specify the name of an AST routine that I want called when events occur. II. AST routine: A. Call X$NEXT_EVENT to pull event off queue B. Process key press event 1. Call X$LOOKUP_STRING to translate key event 2. If key = CTRL-S, continuously remove key press events from the queue until CTRL-Q is encountered. Repeat following steps until CTRL-Q found: a. Call X$MASK_EVENT to get key press event b. Call X$LOOKUP_STRING to translate key event Results: - Step II.A properly removes event from queue - Step II.B.1 properly translates key event into an ASCII string - Step II.B.2.a is properly called if key event was CTRL-S *****>- Step II.B.2.b doesn't always work right - X$LOOKUP_STRING seems to work okay until a CTRL key is pressed - X$LOOKUP_STRING returns 0 (string length), does not update my buffer, yet it properly updates keysym_id_return - ASTs also seem to get backed up causing process to exceed AST limit (client hangs and is eventually dropped by server). Am I doing something really stuipd here? Any advice you may offer will be greatly appreciated. Thanks! ---------------------------------------------------------------------------
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2195.1 | I think there's a bug in X$LOOKUP_STRING | LENO::GRIER | mjg's holistic computing agency | Wed Feb 14 1990 14:22 | 9 |
I had a similar problem trying to use the VMS binding to XLookupString. I didn't have time to figure out if it was my problem at the time, or if it was QAR material. Have you gotten it to work yet? Could you QAR it? I don't have the time now to write up example code which doesn't work so I can QAR it. -mjg | |||||
2195.2 | Keysyms are not all ISO8859 | FEGPX::SWEENEY | Patrick Sweeney in Hong Kong | Tue Feb 20 1990 10:01 | 16 |
Regarding X$LOOKUP_STRING, since there really wasn't a clear explanation of the problem in .0, and since .1 implies there's an error in the binding, let me offer a statement of the problem: "XLookupString (X$LOOKUP_STRING) takes as input an event, correctly returns the keysym, but doesn't update the buffer, and returns a byte count of 0." My answer (and please recall that I'm only a field person without the authority of a DECwindows engineer) "Every keysym _doesn't_ translation into a character (or characters) of the ISO 8859 character set, so for those keysyms (like PF1,F11,etc) the returned bytes is 0 and the buffer is not updated." I consider this to be a documentation error by omission. | |||||
2195.3 | No, I mean a real error... | LENO::GRIER | mjg's holistic computing agency | Tue Feb 20 1990 23:40 | 13 |
It was during my minimal port of the VWS SmallTalk to DECwindows - I wanted to just translate the keypressed events into ASCII. I was unable to get X$LOOKUP_STRING to work AT ALL with several hours of fooling around, but when I switched to using the XLookupString MIT/C binding (still from Pascal) it worked. I wasn't trying to spend much time on it, and I have to admit, I sleazed out and didn't QAR it/make a reproducible minimal program. I was never really sure if I was still calling it incorrectly or if the VAX binding wasn't working right. -mjg |