libURLDownloadToFile buggy?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
rjenkinsgb
Posts: 12
Joined: Tue Feb 17, 2015 1:30 pm

libURLDownloadToFile buggy?

Post by rjenkinsgb » Wed Apr 08, 2015 5:06 pm

Hi,
I'm using libURLDownloadToFile to grab image files on demand in a mobile project.

It's function - or that of the library that is needed - seems very erratic and unpredictable.

On some occasions it works perfectly then on others it fails with a "Handler: can't find handler" error.
Sometimes, changing things in stand-alone application settings (eg. between auto / manual library selection) seems to get it working again, but nothing seems reliable.

Once it works without error in the debugger, it will also then apparently build OK for Android if I select that.

I *think* it's then upset again if I make any changes in the function that contains it, even though these do not change the operation in that area or the parameters passed to the download function.

I'm using livecode 7.0.4 rc3 at present.

Any thoughts on getting this to work reliably?

Thanks,
RJ.

rjenkinsgb
Posts: 12
Joined: Tue Feb 17, 2015 1:30 pm

Re: libURLDownloadToFile buggy?

Post by rjenkinsgb » Thu Apr 09, 2015 8:07 pm

Update - after more searching on here I found mention of problems with some livecode 7.x versions while 6.x worked.

I installed LC 6.7.3 and tried to open my project in that, which did not work as the save file was the wrong version.
I went back to 7.0.4 - and the project ran in the debugger rather than bombing out.

Could this be something to do with the 6.7.3 installer replacing or fixing some library files?

I've not run the 6.x version again since, it just works fine in debug and and builds for Android.

RJ.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: libURLDownloadToFile buggy?

Post by jacque » Thu Apr 09, 2015 8:13 pm

I'd always use manual selection of inclusions, then you know for sure the library will be there. Automatic inclusions sometimes misses things. The error indicates the library isn't loaded.

When/where in your scripts do you call the handler? Libraries don't load completely until the startup is completely finished, so if you are trying to download a file while the app is starting up it may mean that the internet functions are not yet available.

EDIT: I was writing this while you were writing your response. I'd assumed the error was in the Android app. You're saying it occurs in the IDE as well? That would be a different issue, since the IDE loads all its libraries before opening your stack.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

ToddFabacher
Posts: 280
Joined: Fri Jan 09, 2015 6:15 pm

Re: libURLDownloadToFile buggy?

Post by ToddFabacher » Mon Jul 13, 2015 5:32 am

Did we find a resolution to this? I have an App that is now screwed because libURLDownloadToFile just hangs when testing on mobile devices. It runs in the IDE????

--Todd

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: libURLDownloadToFile buggy?

Post by jacque » Mon Jul 13, 2015 7:20 pm

Do you have a urlProgress handler? Does it tell you anything?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”