Mark's solution will work only if the Locator control is defined on the window. But if the Locator control is not there and you are using ABC, you need to identify the object name used by the browse which will be something like the one shown below :
BRW1::Sort0:Locator IncrementalLocatorClass
CASE EVENT()
OF EVENT:TIMER
IF (LastTime# - CLOCK()) > LocatorResetTime
BRW1::Sort0:Locator.Shadow = ''
OR
BRW1::Sort0:Locator.SetShadow('')
END
LastTime# = CLOCK()
END
Yup, that's why we need to know some details about what environment he's using.
You code also brings up an important point, I cannot rely on the timer to only fire N seconds after the last keystroke into the locator, unless there is logic elsewhere to manipulate the timer. I wonder if the following logic would work 0{prop:timer}=0; 0{prop:Timer}=N * 100 If that doesn't work, then it makes sense to store LastKeyStroke=CLOCK() whenever the locator is updated. This in itself can present problems as there can be a number of places to insert that logic. As I think about it more, if there is a locator control and that control does NOT have the IMM attribute, then the timer based clearing logic should be made more complex to check not only the time of the last KNOWN keystroke but also the CONTENTS(?locator)
As an aside, I stongly recommend avoiding implicit variables (ones that end in # " or $). My primary reason is that the compiler can never catch spelling mistakes, it will simply create a new implicit for you. There are other technical reasons to avoid them as well.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.