Welcome Guest Search | Active Topics | Sign In | Register

EO WebBrowser QueryScript Options
Craig Oliver
Posted: Wednesday, December 10, 2014 10:13:45 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
Good morning! The 3.0.89.0 DLL of the EO.WebBrowser dll had an occasional issue with the rundll32 in Windows (depending on the machine, OS updates, etc). The latest version, 3.0.92.0, corrected that (yay!) but seemed to break the QueueScript: I am no longer getting the ScriptCallDone event.

I checked this by putting back the previous DLL, get the hit. Current DLL, no hit. That's the only change.

Quote:
string[] ss = e.NewUrl.ToString().Split(new char[] { '/' });
string s = string.Format("<script location>.public.v1.ipadGetPostbackResult('{0}')", ss[ss.Length - 1]);
var a = webView1.QueueScriptCall(s);
...
[Event opccurs with3.0.89.0, does not with 3.0.92.0]
void webView1_ScriptCallDone(object sender, ScriptCallDoneEventArgs e)
{
if (e.Call.Script.Contains(userInfoPostBack))
...


Any assistance would be appreciated!
eo_support
Posted: Wednesday, December 10, 2014 10:21:33 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

One of the difference between 3.0.92 and 3.0.89 is QueueScriptCall will try to execute the script immediately if possible. So please check whether your event handler is attached after you call QueueScriptCall.

Thanks!
Craig Oliver
Posted: Wednesday, December 10, 2014 10:54:24 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
The event handler part was not changed. I even added a remove / add handler prior to the call just to be really sure it was there in testing, and the event is still not raised.

Quote:
webView1.ScriptCallDone -= webView1_ScriptCallDone;
webView1.ScriptCallDone += webView1_ScriptCallDone;
var a = webView1.QueueScriptCall(s);


When checking the a (a = webView1.QueueScriptCall(<script>) ) the result is null.

I also tried to run EvalScript but at that point javascript is currently not available.

Not sure what else I can try.
eo_support
Posted: Wednesday, December 10, 2014 11:45:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

This appears to be a bug. We will look into it and get back to you as soon as possible.

Thanks!
Craig Oliver
Posted: Wednesday, December 10, 2014 11:51:38 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
Thanks - you guys are always remarkably fast on these things. We certainly appreciate it!
eo_support
Posted: Thursday, December 11, 2014 4:19:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
You are very welcome. We have posted a new build on our download page (EO.WebBrowser.dll version 3.0.93) that should resolve this issue. Please take a look and let us know how it goes.
Craig Oliver
Posted: Thursday, December 11, 2014 5:04:09 PM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
You did fix that, but now the Nuance Silverlight DLL (we use it for Dragon Medical speech recognition) cannot load.

I tested with .93, the call back was working, but the plug in failed. Copied back the .92 version, plug in works, call back not so much. We need the plugin more than the call back at the moment, although long term will will need both. The .89 version worked both, but had a rare rundll32 issue so we could not release that version.

thanks!
eo_support
Posted: Thursday, December 11, 2014 5:51:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Do you use the single DLL build or multi-DLL build?

Thanks!
Craig Oliver
Posted: Friday, December 12, 2014 7:42:48 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
Single DLL. I'll try the multi DLL hopefully later today.

Edit: Later that day...I tried the multi-DLL (3.0.89.1) and the Nuance Silverlight worked, as did the post back.
eo_support
Posted: Friday, December 12, 2014 10:42:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
OK. Thanks for the update. We will address this in our next build so that the single DLL will also work.
Craig Oliver
Posted: Friday, December 12, 2014 10:45:47 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
I also verified that the odd rundll32 issue did not return on the 1 machine we have that had that error.

Thanks!
eo_support
Posted: Friday, December 12, 2014 11:07:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Craig Oliver wrote:
I also verified that the odd rundll32 issue did not return on the 1 machine we have that had that error.

Thanks!


Great. Please feel free to let us know if there is anything else.
Craig Oliver
Posted: Thursday, January 8, 2015 8:20:01 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
Sorry to be a bother, but in initial testing of the latest multi & single DLL it appears that the post-back is again not working. I may try to go back to the version it last worked on to verify that I've not changed something on my end.

Tested with latest Nuget package 3.0.96.
eo_support
Posted: Thursday, January 8, 2015 10:38:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Can you send us a test project that demonstrates this problem? Please see here for test project guidelines:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Craig Oliver
Posted: Thursday, January 8, 2015 3:06:51 PM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
I'm not sure I can: the code uses the EO browser to get to our EHR site, and you need to be able to log in with a valid user as we don't allow any anonymous access. Below is the code in use that did work with the earlier version as noted, but not in the current version.

Quote:
/// <summary>
/// handle async javascript
/// for the moment, only user info is getting returned
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void webView1_ScriptCallDone(object sender, ScriptCallDoneEventArgs e) <- never getting it
{
if (e.Call.Script.Contains(userInfoPostBack))
{
Dictionary<string, string> userinfo = JsonConvert.DeserializeObject<Dictionary<string, string>>(e.Call.Result.ToString());
if (userinfo.ContainsKey("TranscriptionGroupID"))
{
if (userinfo["TranscriptionGroupID"] != "0")
webView1.QueueScriptCall(string.Format("gEHRiMed.public.v1.enableUserSelect('Upload Audio Dictations', '{0}')", App.audioCommand));
}
foreach (KeyValuePair<string, string> item in userinfo)
Log(string.Format("{0}: {1}", item.Key, item.Value));
}
}

void webView1_BeforeNavigate(object sender, BeforeNavigateEventArgs e)
{
if (e.NewUrl.ToString().Contains(App.PostBack))
{
string[] ss = e.NewUrl.ToString().Split(new char[] { '/' });
string s = string.Format("gEHRiMed.public.v1.ipadGetPostbackResult('{0}')", ss[ss.Length - 1]);
var a = webView1.QueueScriptCall(s); <- getting called; a.result is always null
}
}
eo_support
Posted: Friday, January 9, 2015 12:06:21 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi Craig,

Your code by itself looks perfectly fine. We don't need your live project. We need you to try to create a separate test project, whose sole purpose would be for duplicating the problem. Once we have that, we will try to run it here and see what we can find.

Thanks!
Craig Oliver
Posted: Monday, February 9, 2015 10:46:57 AM

Rank: Advanced Member
Groups: Member

Joined: 7/7/2014
Posts: 60
The latest download now works correctly for CallScriptDone! I've only tested the single download, will hopefully have time to test the single DLL as well.

Thanks!
eo_support
Posted: Monday, February 9, 2015 11:13:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Great. Thanks for the update!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.