What do you think? URL works in studio, but not standalone

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tomtom
Posts: 3
Joined: Sat Jul 24, 2010 7:07 pm

What do you think? URL works in studio, but not standalone

Post by tomtom » Mon Jul 26, 2010 6:20 pm

I have a stack that references a website using this statement which works repeatedly in Rev Studio (build 950 version 4.0.0, on Mac 10.5.8 ) :

Code: Select all

put URL (siteToGet) into myURLvariable
In a MacOSX standalone however, getting the URL only works the first time it is called. On subsequent calls it returns a duplicate of the data it got in the initial call.

It seems as though it is caching the data. I gleaned this code from the dictionary but it hasn't helped.

Code: Select all

  on unloadAll
    repeat for each line thisURL in the cachedURLs
      unload URL thisURL
    end repeat
end unloadAll
The Internet script library is included in the standalone settings. I've tried it with everything selected, and with "Search for required inclusions".

Any thoughts on what I might try to get my standalone to work the same way it does in studio?

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

Re: What do you think? URL works in studio, but not standalone

Post by Mark » Sat Jul 31, 2010 4:53 pm

tomtom ,

Can you tell us which URL you are trying to retrieve? Are you using a proxy?

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


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

Re: What do you think? URL works in studio, but not standalone

Post by Mark » Sat Jul 31, 2010 5:35 pm

Dear tomtom ,

Are you using a proxy?

Kind regards,

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

tomtom
Posts: 3
Joined: Sat Jul 24, 2010 7:07 pm

Re: What do you think? URL works in studio, but not standalone

Post by tomtom » Sat Jul 31, 2010 6:21 pm

nope, no proxy.

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

Re: What do you think? URL works in studio, but not standalone

Post by Mark » Mon Aug 02, 2010 10:47 am

Hi Tomtom,

I'm doing a test and will let you know the result later.

I think that the unload command is only effective are loading a url with the load command. What happens if you use the load command instead of the put command, while keeping the unload command in place?

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

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

Re: What do you think? URL works in studio, but not standalone

Post by Mark » Mon Aug 02, 2010 6:18 pm

TomTom,

I tested it and it seems to work fine. I created a script that downloads the URL every 30 minutes. The first 5 hours, the data was the same every time. After 5 hours, the data changed sometimes. The problem doesn't lie in RunRev and your websites. Perhaps you expect different data too often or maybe there is a piece of hardware or software on your computer that caches the data. I can't see that from where I am sitting. Can you tell anything else about your set-up? Perhaps you should do a similar test.

Best regards,

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

Post Reply