` Incremental locator delay (Kevin Erskine ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Incremental locator delay
2001-11-16 -- Kevin Erskine
 
This is a template solution -- letting CW do what it wants.... Generated Code.... Blue code is standard CW generated code.. BRW1::Sort0:Locator.TakeKey PROCEDURE ReturnValue BYTE,AUTO !--- ! (BGN) Incremental Locator Delay !--- !--- In order to reduce file I/O for Incremental locators, take the keycode and !--- if there are more in the buffer continue until no more !--- DelayUntilTime LONG(0) ! Delay Field eStdDelayTime EQUATE(35) ! 35/100 of a second !--- CODE !--- LOOP ! Loop until no KeyCodes in Buffer !- ReturnValue = PARENT.TakeKey() !- DelayUntilTime = CLOCK() + eStdDelayTime ! Set Delay Time LOOP WHILE NOT KEYBOARD() | ! Pause Until A KeyCode AND ABS(CLOCK() - DelayUntilTime) <= eStdDelayTime ! OR TimeOut YIELD() ! Give other Processes time END !- IF KEYBOARD() ! Is there another KeyCode ASK ! Get Next KeyCode CYCLE ! Process KeyCode ELSE BREAK ! All Done END !- END !--- ! (END) Incremental Locator Delay RETURN ReturnValue Template Code... #!============================================================================= #!=== (BGN) - Incremental Locator Delay #!============================================================================= #AT(%LocatorMethodDataSection),WHERE(INSTRING(', TakeKey',%EmbedParameters,1,1) AND %LocatorType = 'Incremental') !--- #

Today is April 26, 2024, 10:56 pm
This article has been viewed 35114 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: