Borislav,
We tried a similar logic by creating a test app with a timer class that instantiate a Custom class from timer Init event, then adding code
to timer Event to set a timeout flag in Custom Class
ocustom is TImer Object property that is instantiated in TIMER INT event as such:
this.ocustom=CREATEOBJECT("custCls")
the TIMER Event in Timer class, contains the following code:
?"timefire"
?this.ocustom.name
this.ocustom.ltimeout=.t.
KEYBOARD "{ESCAPE}" && here I add this to Interrrupt the report spooling
the CustCls contains a "mlongprocess" method that has the following code:
IF this.ltimeout
RETURN .f.
ELSE
SET ESCAPE ON
ON ESCAPE do cleartimer()
lcpdFfile="c:\longreport.PDF"
lcRptName="Rptind_cust"
*-- some other code in here for instantiate PDF printer
loPDFPrinter.DefaultFileName=lcPdfName
REPORT FORM &tcRptName TO PRINTER NOCONSOLE NOWAIT
ENDIF
WAIT " end of Long process" WINDOW nowait
_________________________________________________
From VFP command windows, did the following:
otimer=CREATEOBJECT("clstimer")
otimer.interval=20*1000 && 20 seconds
the timer fire and display messages to VFP windows, but as we execute the following command:
otimer.ocustom.mlongprocess()
a window show up with print spooling pages
the timer event stop executing, the only way to stop it by manually hitting ESCAPE.
It look like that REPORT FORM TO PRINTER transfer the control to Printer.