Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Issues with on escape & retry
Message
From
26/03/2009 11:04:36
 
 
To
25/03/2009 13:10:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 2000 SP3
Miscellaneous
Thread ID:
01387783
Message ID:
01391611
Views:
46
Just to give an update on this:

I think you are all correct with your suggestions. It seems that the escape key does not actually interrupt the currently running statement, therefore, there is no-need to re-run it using retry.

So, I have removed my retries, which fixes the nesting errors.. problems solved!

Thanks
Will

>Hi All,
>
>Thanks for the responses.
>
>Maybe i mis-understood the usage of retry.
>Imagine this scenario:
>a loop is running which performs 10 long running queries.
>When user presses Esc, it will cancel one of the queries mid-run, therefore no results are produced for that query.
>
>If I return from the EscapeKey function, won't it skip to the next record in the loop, therefore my result set will only have 9 queries instead of 10?
>
>From the VFP Help:
>However, if a procedure specified with ON ESCAPE includes RETRY, the program line that was executing when you pressed ESC executes again
>
>In practice, when I tested my above theory, this was not the case.. but it did seem logical to me.
>
>As for Jims "single exit point" coding, I agree this is a best practice which should be used.
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform