On Sunday, Dec 15, 2002, at 23:59 US/Pacific, Ugo Cei wrote:

Ovidiu Predescu wrote:
One solution would be to define a pseudo-continuation, just after you finish the function initialization code, which could be referred from the View page template. Something like:
function myFunc()
{
var a;
// Long initialization code here
startForm(); // Creates a dummy continuation, with no page
// being sent to the browser
Since you didn't provide the code for this startForm() function, I tried to write it myself, copying the code from _sendPageAndWait() minus the call to cocoon.forwardTo():

function startForm(timeToLive)
{
var k = new Continuation();
var kont = new WebContinuation(cocoon, k, lastContinuation, timeToLive);
suicide();
}

Do you think this would work?
Great Ugo! This should work fine, but please do let me know if you encounter any issues.

What's this suicide() function? I don't find it defined anywhere.
It's a continuation object created by callFunction(), the entry point in the control flow. 'suicide' is the continuation of the callFunction(), which does nothing else than return the control to the sitemap, which invoked callFunction(). 'suicide' is called by the blocking sendPage() to return the control to the sitemap, after the continuation of sendPage() has been stored away.

Best regards,
Ovidiu


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



Reply via email to