smart client -> webclient

Forum to discuss the Web client version of Servoy.

Re: smart client -> webclient

Postby Infop » Sat Sep 18, 2010 9:43 pm

Hans Nieuwenhuis wrote:Here is a pdf


Thank you very much, Hans.
User avatar
Infop
 
Posts: 151
Joined: Fri Nov 30, 2007 3:00 pm

Re: smart client -> webclient

Postby Infop » Sat Oct 02, 2010 10:28 pm

Hi All,

I have tried with below code, according to the Slide #24 of document "JavaScript Expert webinar slides", to suspend the current execution for a larger time in Web Client but, It didn't worked. Can any one please, help me on the same?

Code: Select all
// call to the Show form in Dialog
application.showFormInDialog(forms[formName], -1, -1, -1, -1, title);

// suspend the current execution
globals.cont = new Continuation();
new Packages.org.mozilla.javascript.continuations.Continuation()();
globals.cont();

// Do some other processing


Thanks
User avatar
Infop
 
Posts: 151
Joined: Fri Nov 30, 2007 3:00 pm

Re: smart client -> webclient

Postby Infop » Wed Oct 06, 2010 10:00 pm

Does anyone having any sample code snippet for the same?? Please, share, if anyone have any or any thought on the same.

Thanks,
User avatar
Infop
 
Posts: 151
Joined: Fri Nov 30, 2007 3:00 pm

Re: smart client -> webclient

Postby pbakker » Thu Oct 07, 2010 10:03 am

If you want to know more about Continuations, have a look here: http://wiki.apache.org/cocoon/RhinoWithContinuations

It's been a while since I looked at Continuations and everytime I look at them again, I need to think hard to understand exactly how they work, but looking at your example, I think the following is off:
Code: Select all
1: globals.cont = new Continuation();
2: new Packages.org.mozilla.javascript.continuations.Continuation()();
3: globals.cont();



Line 1 captures the state of the exection stack into the globals variable cont.
Line 2 stops the execution of the current (stack of) method(s)
Line 3: because line 2 stopped the execution of the current (stack of) method(s), this line will not get executed.

Usually, line 1 & 2 go together in a method and line 3 is used to resume the execution of the execution stack captured in the global variable cont

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Previous

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 5 guests