Problem with "put URL" compared to the url in a Br

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am

Problem with "put URL" compared to the url in a Br

Post by gmccarthy » Mon Mar 23, 2009 1:21 pm

The following did not work in a rev stack.

put url "http://tbn1.google.com/images?q=tbn:M0p ... -500kr.jpg" into img "preview"

However,
pasting the same url into a browser shows the image correctly.

Can any tell me what might be going on here?

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Mon Mar 23, 2009 2:13 pm

It works for me if I do:

Code: Select all

put url ("http://tbn1.google.com/images?q=tbn:M0p1AuMrnvQ6lM:http://z.about.com/d/mustangs/1/0/t/4/-/-/2008-mustang-500kr.jpg") into img "preview"
- I almost always have to wrap http urls in parentheses (Win XP here)

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Mon Mar 23, 2009 6:05 pm

Yeah- I think the documentation is misleading here. I think URL should be documented as a function rather than a keyword and the parentheses should be documented as required, or at least treated at the same level as quotes around literal strings. The fact that you can sometimes get by without parens in url parameters is, IMO, a side-effect of lax syntax parsing.

Post Reply