Runtime error with 'get URL'

Dave Cragg dcragg at lacscentre.co.uk
Wed Jan 14 12:52:59 EST 2004


At 9:24 am -0800 14/1/04, Mark Powell wrote:
>I am on Windows 2000 with two machines A and B.  I develop and debug on A,
>but test standalones on both A and B.  I have a runtime error that I have
>isolated to the following code in the preOpenStack handler:
>
>...
>get URL ClientDataCurrent
>answer "calling from preOpenStack, this is what is \
>    read from the data_current file:" & return & it
>if (the result is not empty) then
>    <exit routine>
>end if
>put it into gWhatever
>...
>
>On machine A in both the IDE and standalone, gWhatever is populated and
>everything works as desired. On machine B, the code gets nothing from the
>text file (confirmed by the answer dialog during runtime).  The result
>testing is not triggered in any scenario.  Moreover, on both A and B I can
>validate connectivity by pasting the URL into a browser and seeing the data
>directly.
>
>Any ideas?  Are there additional tests I can do during runtime that will
>shed light on this?

It looks like you're checking the result from the "answer" and not 
the "get URL".

Does this make a difference?

get URL ClientDataCurrent
if (the result is not empty) then
    <exit routine>
end if
answer "calling from preOpenStack, this is what is \
    read from the data_current file:" & return & it
put it into gWhatever

Also, the "it" in "put it into gWhatever" will be the name of the 
button clicked in the answer dialog. (presumably "OK") Is that what 
was intended?

Is the url a "file" url or an "http" or "ftp" url? If http or ftp, 
are you sure libUrl has loaded at this stage. In a standalone, I 
think the rev libraries don't get loaded until after the preOpenStack 
handler.

Dave


More information about the use-livecode mailing list