[futurebasic] FB II: More on timed-out alert problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1999 : Group Archive : Group : All Groups

From: Bob Bryce <rbryce@...>
Date: Thu, 16 Dec 1999 11:39:55 -0800
Hi again;

I added "boolean = 0" under CASE ELSE in the ENTERPROC
for timing out an Alert for may splash screen. That
resulted in it responding to Return, Enter or Esc
to cancel the Alert; however the timed out feature
still cycles; six seconds, Alert closes, only to
re-appear, time out, reppear etc. until manually
cancelled. Why, o why o why?????


GOTO "endSkip"
"myFilter"
ENTERPROC(dialogPtr&, EvtPtr&, Hitee&)
  boolean = 0
  LONG IF {EvtPtr}=_KeyDwnEvt
    Key = PEEK(EvtPtr& + _evtMessage + 3)
    SELECT CASE Key
      CASE 27                                     'Escape=27
        boolean = -1                              'cancel Btn
        %Hitee&, 2
      CASE 13, 3                                  'Return or Enter
        boolean = -1
        %Hitee&, 1
      CASE ELSE
	boolean = 0	'*********This causes Return, Enter & Esc. to work
    END SELECT
  XELSE
    tocks&=FN TICKCOUNT
    LONG IF tocks&>timeOut&
      boolean = -1
      %Hitee&, 151
    END IF
  END IF
EXITPROC = boolean
"endSkip"

LOCAL FN InitAbout
  a%=151
  WHILE a%=151
    timeOut&=FN TICKCOUNT+360                     'add 6 seconds
    myFilterAddr&=LINE "myFilter"
    a%=FN ALERT(_AboutMAF,myFilterAddr&)
    DELAY 500
  WEND
END FN

'--------Main-------
FN InitAbout

Bob Bryce