|
| Inicio → WINDEV 2024 → WD23 Compilation error: Ambiguous use of the 'restRequest' type |
| WD23 Compilation error: Ambiguous use of the 'restRequest' type |
| Iniciado por Malc, 03,dic. 2020 14:06 - 5 respuestas |
| |
| | | |
|
| |
Miembro registrado 7 mensajes |
|
| Publicado el 03,diciembre 2020 - 14:06 |
OK, anyone ever get this to work.
Even tried copying the example from the help page and still shows error. Seems OK in WD25
httpRequest also give similar compilation error.
<sigh> Not looking forward to mentioning this to my superiors. They are not fans of PC Soft - the company I work for is heavily into MS, and while I like the language and features of WD, its getting hard to defend it when we get so many issues. Any help appreciated. Guess I'll pass it on to PC SOft as well.
Cheers
Malc |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 23 mensajes |
|
| Publicado el 03,diciembre 2020 - 23:38 |
Hi Malc,
Can you post the code that leads to this error message? Which particular example did you use to also get this error?
Best Regards, Geoff |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 7 mensajes |
|
| Publicado el 04,diciembre 2020 - 11:12 |
Hi Geoff
Reproduction protocol: Copy example from help page:
https://help.windev.com/en-US/index.awp…
i.e. cMyRequest is restRequest cMyRequest..URL = "http://www.windev.com" cMyResponse is restResponse = RESTSend(cMyRequest) IF ErrorOccurred THEN Error(ErrorInfo(errFullDetails)) ELSE Info(cMyResponse..Content) END
It will show compilation error, as will the example for httpRequest
That being said, I got a rather quick reply from PC Soft basically saying tough. WD23 no longer supported, use 25
It is rather amazing that they can put commands and types into the product that just don't compile. Guess their testing is even more rudimentary than ours.
Anyways, if you have a workaround I will be grateful, meanwhile I'll try using SOAPRunXML instead, which I have got working in the past.
Cheers
Malc |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 23 mensajes |
|
| Publicado el 04,diciembre 2020 - 13:03 |
Hi Malc,
The example results in an error displayed when run in 25, but the following code which I put together for another guy's project works fine in both 25 and 23.
req is httpRequest req..Method = httpGet req..URL = "https://msto.startrack.com.au/track-trace/…"
resp is httpResponse = HTTPSend(req) IF ErrorOccurred THEN Error(ErrorInfo(errFullDetails)) ELSE Info(resp..Content) END The content is quite verbose because the id is no longer valid, but it doesn't error out.
Best Regards, Geoff |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 7 mensajes |
|
| Publicado el 10,diciembre 2020 - 14:01 |
Hi Geoff
Thanks for the response. Sorry for the delay - I only work part -time (semi-retired)
Tried your example in a standalone test form and it worked fine, added it to a test form in my project and same issue. Then a lightbulb went off. I prefixed the calls/types with WL and lo and behold, no compilation errors. Then I searched the source of some NET DLLs attached to the project and... yep same function names found, though curiously not showing as far as I can tell in the project explorer. (Though to be honest, I did not drill down through every (30+) .NET assemblies listed)
Now I just have to figure out how to use the functions...
Cheers
Malc |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 23 mensajes |
|
| Publicado el 10,diciembre 2020 - 23:53 |
Hi Malc,
I'm glad you've made some progress.
By the way, I noticed in my example I had used httpRequest, httpSend etc. You can safely replace this with restRequest, restSend, etc and it will work the same.
Best Regards, Geoff |
| |
| |
| | | |
|
| | | | |
| | |
|