>>Hi everybody,
>>
>>Here is a problem:
>>
>>Class (or program) does some long process (Excel automation), but does not use any VFP specific loop construction. This class (program) shows an animation (using animation class), so user can at least be enterteined by this. However, some users (which are impatient, as I'm) could be tired of waitng and want to stop this long process right away. So, the problem is: how can we stop the process and return control to the main program, which invoked this long process program?
>>
>>What could be your ideas?
>>
>>Thanks a lot in advance.
>
>Nadya,
>
>would this work for you ?
>
>
>local sEscape, sOnEscape
>private Escaped
>Escaped = FALSE
>sEscape = Set('Escape')
>sOnEscape = On('Escape')
>on escape escaped = TRUE
>set escape On
>
>
>
>if( Escaped )
>
>endif
>
>
>on escape &sOnEscape
>set escape &sEscape
>
Hi Gregory,
Great minds think alike :) I was thinking exactly the same and implemented it, but here is a problem: since the calling program (class) doesn't use any loop constructions, you would need to wrap every single command with this statement, which is no good. I don't like timer's idea here, but I currently don't see other possibilities...
If it's not broken, fix it until it is.
My Blog