cfg.Fast (issue)*

73 views
Skip to first unread message

Tausif Alam

unread,
Jan 2, 2023, 12:59:37 AM1/2/23
to DroidScript
Hi devs,
Don't know why but when I add cfg.Fast to switch to JSV8 engine then after Droidscript doesn't preview my app and when i remove it works fine!
Why???

Right2TheV0id

unread,
Jan 2, 2023, 9:46:54 AM1/2/23
to DroidScript
This is difficult to evaluate with so little information.
Could you share code (minimal is better) or at least elaborate?

Message has been deleted

Tausif Alam

unread,
Jan 3, 2023, 5:31:50 AM1/3/23
to DroidScript

I was just going through the example to check this feature only:-


cfg.Fast
function OnStart()
{
    lay = app.CreateLayout( "linear", "VCenter,FillXY" );

     web = app.CreateWebView( 1, 1, "Progress" );
     web.SetOnProgress( web_OnProgess );
     lay.AddChild( web );

     app.AddLayout( lay );

     web.LoadUrl( "http:///www.google.com" );
}

function web_OnProgess( progress )
{
     app.Debug( "progress = " + progress );
}

After adding cfg.Fast whenever i click the preview button it does not show me preview and before that works fine

Right2TheV0id

unread,
Jan 3, 2023, 6:37:50 AM1/3/23
to DroidScript
I'm not premium so I can't test myself, but does other samples/demos fails also (like "Controls Dark")?
Otherwise note that cfg.Fast have some limitations as Dave stated:


"There is however a small price to pay for this extra speed, as the J2V8 engine has no DOM and no XMLHttpRequest object which might make some third party js libraries complain and/or fail.  We have however provided a basic 'polyfill' for XMLHttpRequest which uses app.HttpRequest() internally and should work for many situations."

"You can't combine cfg.Node and cfg.Fast they run different V8 engines
Also, I'm not sure app.OpenDatabase() will work in cfg.Fast mode because it might use DOM, I will check."

Right2TheV0id

unread,
Jan 18, 2023, 10:51:51 AM1/18/23
to DroidScript
I was able to test it recently and I can't reproduce the issue.
The sample you provided runs well from mobile IDE and from Wifi IDE.

Reply all
Reply to author
Forward
0 new messages