----boundary-LibPST-iamunique-1706906089_-_-
Content-type: text/plain
Rex,
I should have said that I took my code from ObxWrappers and modified it slightly
to be more robust and not hang.
-Doug Danforth
On 3/29/2011 1:26 PM, Rex Couture wrote:
At 06:42 PM 3/28/2011, Stephen Troy wrote:
Thanks, Rex, but it seems as though the application is really, really freezing, and it doesn't seem to respond to anything, up to and including a sledgehammer.
Yes, I know. At this point I'm trying to understand it myself. This shows my profound ignorance of Windows programming, but beyond that, I'm trying to find a ReadKey method that works. With just the line
REPEAT UNTIL ORD(XYplane.ReadKey()) #0
the display freezes solid if you change focus with the mouse, but it still reponds to the keystroke if you
through windows.
With
REPEAT
ProcessMessages
UNTIL ORD(k.ReadKey()) # 0;
ReadKey is unresponsive, and there are bizarre, unpredictable effects on the BB GUI. (Complete program below)
Does BB have any simple, unfailing procedure to read input directly from the keyboard? Evidently XYplane.ReadKey doesn't work. There has to be something.
Rex Couture
MODULE TestReadKey; (* Not working *)
IMPORT k:=XYplane,StdLog, Win:= WinApi;
PROCEDURE ProcessMessages;
VAR msg: Win.MSG; res: INTEGER;
BEGIN
WHILE Win.PeekMessage(msg, 0, 0, 0, Win.PM_REMOVE) # 0 DO
res := Win.TranslateMessage(msg);
res := Win.DispatchMessageA(msg)
END
END ProcessMessages;
PROCEDURE P*;
VAR c: CHAR;
BEGIN
REPEAT
ProcessMessages
UNTIL ORD(k.ReadKey()) # 0;
StdLog.Ln;
StdLog.String( 'If you see this, it works');
END P;
END TestReadKey.
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
----boundary-LibPST-iamunique-1706906089_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbWh0bWwxIFxkZWZmMHtcZm9udHRibA0Ke1xmMFxm
c3dpc3MgQXJpY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