Hi guys,

Ive been fiddling with a program of mine, wondering why I cant make it work. The problem boils down to the following: The code below does exactly what it should, EXCEPT the first time it is run! To test it do the following:

(You need ptrmen, the EasyPointer [EP] toolkit, loaded). Fire up a SB daughter job (the example expects at least two QL windows #0 & #1.) LOAD the program, type run and then press and hold ENTER or the RMB (ie DO) to execute. The first time it runs it displays "Key up" although a key is actually down! You need to release the key and then depress it again to get the correct result. Subsequent execution also gives the right result. To reset it, you need to start it in a pristine SB job again (ie one that has not yet had its OUTLine set).

I suspect the "problem" lies with the PI rather than EP. Its annoying because it prevents some fine tweaking of a user interface Im working on - and because its just plain wrong. Ive spent more time than I can afford on trying to work around the problem, to no avail. Any ideas?

Per

1 DIM pv%(15)
2 x% = -1: y% = -1
3 mv% = 1 + 2 + 4
4 :
5 OUTL#0
6 CLS
7 RDPT#0; 48, x%, y%
8 :
9 PRINT; 'HIT or DO. ESC to quit'
10 :
11 REPeat loop
12  RDPT#0; mv%, x%, y%: PVAL#0; pv%
13  AT 2,0
14  IF pv%(7) && 4: PRINT 'key up',: ELSE : PRINT 'key down',
15  IF pv%(6) = 27: EXIT loop
16 END REPeat loop
17 :
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to