2023-02-17, 13:30:26
To simplify programming and avoid "asynchronous callback hell" it would be nice if Sync methods could be added for ExecuteScript and NavigateWithWebResourceRequest.
Thanks you,
Vasile
Thanks you,
Vasile
new Sync methods
|
2023-02-17, 13:30:26
To simplify programming and avoid "asynchronous callback hell" it would be nice if Sync methods could be added for ExecuteScript and NavigateWithWebResourceRequest.
Thanks you, Vasile
2023-02-21, 12:08:32
Hi Vasile,
Sorry I seem to have missed your question, so my reply is a bit slower than usual. The version of AntView that was released today has a sync version for NavigateWithWebResourceRequest added, see NavigateWithWebResourceRequestSync. I'll put the request for a synced version of ExecuteScript on the list. Note that in the mean time there is a RunAnonymousFunctionSync that you can use instead. -- Wil
2023-02-21, 16:24:11
Hello Wil,
Thanks for the new version. Is it possible to have a thread in this forum where you post when a new version is online ? Thanks, Bernard.
2023-02-21, 16:33:44
Hi Bernard,
Thanks for the question. I came to the same conclusion earlier today... as we already had a section for the other products. So added it to the general updates section as a sticky post. Updates Still contemplating a bit if it would be better for each section at the forum to have their own updates area. -- Wil
2023-02-21, 18:09:19
Thanks Will, it is perfect.
Regards, Bernard.
2023-02-22, 08:11:03
Hi Willa
> Sorry I seem to have missed your question, so my reply is a bit slower than usual. Comparing the support offered for other products, the support you provide for AntView is lightning fast. Bravo Wila ! >NavigateWithWebResourceRequestSync NavigateWithWebResourceRequestSync gives me the opportunity to clean-up my code by removing a lot of timers and the functions they call, asynchronously. I use AntView activex control, in dBase 2019, to send electronic invoices (xml string) and now this can be done with only 3 lines of code (the server response is a json string). form.AntView1.nativeObject.NavigateWithWebResourceRequestSync( uri, "POST", xmlString, "Content-Type: application/xml" ) rJsonString = new string() form.AntViewDocument1.RequestCurrentTextSync( rJsonString ) Very, very simple. Thanks you. >RunAnonymousFunctionSync In another project, I use RunAnonymousFunctionSync as often as possible, but I failed when the function had to call another custom function that is defined in the same string. Example: // jsString (p1, p2) => { a = customFunction1( p1 ) ; b = customFunction2( p2 ) ; return a + b ; } function customFunction1(x) { return x ; } function customFunction2(y) { return y ; } AntView activex control integrates very well with dBase 2019, parameters can be passed easily //dbase code, {myVar1, myVar2} is a literal array (1 dimension , 2 elements ) vRet = new string() form.AntViewDocument1.RunAnonymousFunctionSync(anyIntValue, {myVar1, myVar2}, jsString, vRet) If there is no additional function declaration in the jsString, the execution succeeds, otherwise it fails. For these situations I use: form.AntView1.nativeObject.ExecuteScript(jsString) // jsString p1 = "value of myVar1"; p2 = "value of myVar2"; a = customFunction1( p1 ) ; b = customFunction2( p2 ) ; function customFunction1(x) { return x ; } function customFunction2(y) { return y ; } That's why I would like there to be a SYNC variant of the ExecuteScript method. Thanks you Vasile |
« Next Oldest | Next Newest »
|