if I put <<put there is a url "https://www.apple.com">> into the message box I get "false"
if I put << launch "https://www.apple.com">> into the message box then the url opens correctly.
That seems strange to me. Is that a bug or is there an other way to find out if an url exists?
put URL → strange
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 12
- Joined: Sun Apr 16, 2006 4:52 am
Re: put URL → strange
Hi Till,
obviously URLs do not belong to the things you can check the existence of!
From the dictionary about "there is...":
...
there is a {object | file filePath | folder folderPath | process procName}
...
I would "get" or "put... into" and check hte result. This is the result from a little test I just made:
tsneterr: (6) Couldn't resolve host 'www.abcdefghijklmnopqrstuvw.com'
Best
Klaus
obviously URLs do not belong to the things you can check the existence of!
From the dictionary about "there is...":
...
there is a {object | file filePath | folder folderPath | process procName}
...
I would "get" or "put... into" and check hte result. This is the result from a little test I just made:
tsneterr: (6) Couldn't resolve host 'www.abcdefghijklmnopqrstuvw.com'
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 12
- Joined: Sun Apr 16, 2006 4:52 am
Re: put URL → strange
great thanks!
-
- VIP Livecode Opensource Backer
- Posts: 9833
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: put URL → strange
That seems to be the case, but as long as it's going to give a value unrelated to a meaningful evaluation of the specified source (whether or not the requested resource exists), wouldn't "true" be the better answer?Klaus wrote:obviously URLs do not belong to the things you can check the existence of!
After all, the url string itself is non-empty.
And even if the expression were evaluated, in all cases the value would be non-empty because at very least an error code would be the result.
Probably not worth the time to file an enhancement request for, but at the moment I side with the OP's linguistic intuition on this one.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn