Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Escape a method
Message
 
To
11/05/2010 01:58:08
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01464090
Message ID:
01464097
Views:
44
>Hi Martina,
>
>long time not seen. How is live? (^.^)
Many boys, much sex ;-) (eh no, I have not free time for boys)

>
>O.K.
>For the moment this is just gathering of information, not test here possible.
>
>Do you have an idea how to determine that the return is from "RETURN TO" rather then the normal RETURN?
>
>And for a button the idea would be to use KEYBOARD to inject the ESC? Or would this return from the CLICK event?

For canceling by any button you must change calculation methods (call DOEVENTS and test any public canceling flag)

If you use ON ESCAPE... you don't need change calculation method.

OK, examples...
* PROCEDURES
SET ESCAPE ON
ON ESCAPE RETURN TO MainProc
DO MainProc
SET ESCAPE OFF
ON ESCAPE 

PROCEDURE MainProc
?"START"
=ChildProc()
?"END"

PROCEDURE ChildProc
DO WHILE .T.
   ?TIME()
ENDDO
* Methods
SET ESCAPE ON
ON ESCAPE RETURN TO MainProc
loObj=CREATEOBJECT("_test")

loObj.MainProc()
SET ESCAPE OFF
ON ESCAPE 


DEFINE CLASS _test AS CUSTOM
PROCEDURE MainProc
?"START"
=this.ChildProc()
?"END"

PROCEDURE ChildProc
DO WHILE .T.
   ?TIME()
ENDDO

ENDDEFINE
MartinaJ

>
>Agnes
>[<><]
>>Hi Agnes,
>>
>>Try use ON ESCAPE RETURN TO ProcedureName
>>
>>
>>MartinaJ
>>
>>>Hi,
>>>
>>>following problem occurs to me:
>>>I have a method that controls the data generation for reports. This could be complex calculation. If the user selects the wrong range it could run for a while.
>>>The control is generic, controled by a table. The calculation methods are well tested and established, and there is a large number of it. The callstack of the calculation could be variable, the position of the generic control too.
>>>
>>>Now the user likes to stop the generation.
>>>
>>>Is there a chance to use ESC key and/or some button to stop the generation without changing the calculation methods?
>>>
>>>TIA
>>>
>>>Agnes
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform