>> In my XTension I start a PDF export in a class (e.g. name ClassA) using
>> the
[quoted text clipped - 17 lines]
>
> patrick
> ClassB has a loop where are several pdf exports are done. But I can't do a
> pdf export in this loop while another pdf export is running. Thats because I
> have to wait until the callback in ClassA is called, means the pdf export is
> finished. Then I can do the next export. Its quite tricky I think.
OK, now you're providing new information...
So you need to do a number of asynchronous pdf exports in ClassB. I
would make ClassB maintain a stack of export tasks. Start the export of
the top task in the export method you call from ClassA. In the ClassB
callback you can simply call the export method again to process the next
task. When the stack is depleted, you can call the ClassA callback.
patrick
Hans Stoessel - 31 Jul 2006 13:19 GMT
Hi Patrick
Thank you very much for the answer.
This way doesn't solve my problem. I can't build a stack from export tasks
because the Quark document (QXP) has to be open for the export. This means I
have to open the Quark document, export it as a PDF and close it again. I
open the Quark document in ClassB and call the method xtpdf_export to export
it as PDF. Then I have to wait until the callback function in ClassA (PDF
finished) is called from the export method xtpdf_export. After the callback
is called, I can close the document (QXP). If I close the document before
the PDF is finished, the XTension crashs. Thats the reason I have to wait in
a loop. When I wait, the xtpdf_export calls the callback "PDF export
started", but after that no callback method is called. I don't know why. On
Windows this works fine, on Mac OS X not.
Regards
Hans
>> ClassB has a loop where are several pdf exports are done. But I can't do
>> a
[quoted text clipped - 13 lines]
>
> patrick