I have a Xojo desktop app that works perfectly on OS X but there is a major bug/issue on Windows.
I have an API on a server I run. The following code on OS X:
[code]dim http as new HTTPSocket
dim dataString as String
dim data as JSONItem
dataString = http.Get(http://demo.worris.com/api/v1/test?api_key=5AABDF05A8B5D7D94D2F340618CB0D2293D6AFEA5EF5D38004FA05AAD29CFA88, 10)
data = new JSONItem(dataString)[/code]
Returns the following JSON string:
after a second or so. Running the exact same code on Windows 7, Xojo 2014r1 with IE 11 as the default browser times out with no response.
I’m not sure if it’s related but typing the above URL into IE on the Windows machine doesn’t display the JSON string like it does on Chrome, Firefox or Safari but asks me if I want to “open or save test.json”.
Does Xojo use IE on Windows for communicating by default? Could this be the issue?
Maybe use a httpsocket with events instead of synchronously and see what error message you get in error events?
On Windows I had some issues with the default firewall and antiviruses which block some web traffic (like AVG and Avast).
Try adding an exception to these apps for your app, or disable them completely temporarily. Should work.
Interesting, it runs just fine for me (after putting quotes around the url, of course) on my Win7 virtual machine in Parallels. I tried remote debugging from OSX as well as installing the IDE and running it in the VM, both worked fine. IE11 is the default browser.
Turned off the Firewall to no effect
http.Yield = True
Immediately before the Get() call it sort of works but (still on Windows) it doesn’t reliably get a response every time. Setting the Yield property to True is also causing some weird behaviour in my UI, for instance with Listboxes not firing click events for a few seconds, etc…
Try increasing the timeout. I find that DNS resolution can be somewhat slower on Windows.