load URL wth message hangs

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

load URL wth message hangs

Post by Simon » Thu Dec 20, 2007 4:01 am

Hi,
I've been downloading files using
load URL "http://......" with message "downloadComplete"
just like the docs say.
But on large or slow downloads the downloadComplete message never gets passed. I watch and can see when the bytesReceived = bytesTotal but the app just hangs never getting to "downloaded". Hitting Ctrl+. does push it through in the stand alone and during development.
Anybody have any ideas on how to fix this?

Thanks,
Simon

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Dec 20, 2007 10:13 am

Simon,

It would be easier if you posted your script. Are you using a repeat loop with "with messages" added to it?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Post by Simon » Sat Dec 22, 2007 1:29 am

Hi Mark,
Here is the code:

on updatePod
load URL "http://www.lunar.com/pressroom/podcast/ ... 121807.mp3" with message "downComplete"
end updatePod

No loops, really simple.
The difficult part in testing this is try it on a dial-up. Or figure out how to choke your bandwith to 26KB/s. Then you'll see the problem.

Thanks,
Simon

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Dec 22, 2007 1:32 am

Simon,
I watch and can see when the bytesReceived = bytesTotal but the app just hangs never getting to "downloaded"
How?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Post by Simon » Sat Dec 22, 2007 1:37 am

Hi Mark,
I had libURLSetStatusCallback running but took it out as I wasn't interested in the progress. So I could see it then.

Regards,
Simon

Post Reply

Return to “Internet”