Opening PDF in revBrowser with Decimal Point in its name

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Opening PDF in revBrowser with Decimal Point in its name

Post by montymay » Sun Nov 01, 2015 6:59 am

I have a field that lists PDFs on a remote web site. If the user clicks on a line in the list, the PDF is opened in the revBrowser.

The web pages have URLs with this pattern:
http://www.guamcourts.org/CompilerofLaw ... 7gc009.PDF
http://www.guamcourts.org/CompilerofLaw ... c009.5.PDF
http://www.guamcourts.org/CompilerofLaw ... c009.6.PDF
http://www.guamcourts.org/CompilerofLaw ... gc0010.PDF

My script puts the characters between "gc00" and ".PDF" into a variable "tChapterNumber"

I open the files with:
revBrowserSet gBrowserID, "url", "http://www.guamcourts.org/CompilerofLaw ... mber&".PDF"

My script opens all the files except the ones ending in "9.5" and "9.6". I get "404 - FIle or directory not found." I checked and the
variable does contain "9.5" and "9.6", respectively.

I have no control over the website. I've tried everything that I know without success, including omitting the variable and writing
revBrowserSet gBrowserID, "url", "http://www.guamcourts.org/CompilerofLaw ... c009.6.PDF"

Is this a bug? Is there something about the decimal point in the name that results in the failure to open it? Is there a workaround?

Thanks very much for considering my issue

Monty

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Opening PDF in revBrowser with Decimal Point in its name

Post by Klaus » Sun Nov 01, 2015 5:48 pm

Hi Monty,

see attached screenshot, no problems at all!
Mac OS X 10.11.1, LC 7.1.1 RC2, RunRev Browser sample stack.

Since there are so many different version "en route", please always note your LC version!
And always test with the latest version, get them here: http://downloads.livecode.com/livecode/


Best

Klaus

P.S.
HINT: ALWAYS use parens when concatenating strings for URLs, file- and object names!
...
revBrowserSet gBrowserID, "url", ("http://www.guamcourts.org/CompilerofLaw ... mber&".PDF")
...
Attachments
rev_browser.jpg

montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Re: Opening PDF in revBrowser with Decimal Point in its name

Post by montymay » Sun Nov 01, 2015 11:47 pm

Hello Klaus:

Thank you very much for reading my post, testing my script, and replying. Alas, it still will not work for me even after placing the URL in parens. Even after copying and pasting your script into my script. Even after copying and pasting the URL from my web browser into the URL parameter. I tried it with LC 7.0.6 and 8.0 (dp 5) (Indy). My OS is WIndows 10. I see that the latest LC version is now 8.0 (dp 7). Should I try it on a Mac OS? Should I download 8.0 (DP 7) and try it? Is not the server error, using my OS, and occurring only when a file name contains a decimal point, significant of something?

Regards

Monty

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Opening PDF in revBrowser with Decimal Point in its name

Post by Klaus » Mon Nov 02, 2015 1:16 pm

Hi Monty,

sorry, in the moment I don't have a clue what might go wrong on your side :-/

Regarding versions, rule of thumb:
For production (creating standalones for customers) use the lastest STABGLE version.
For testing your projects for compatibility and getting used to new features, and LC 8
is full of them, use the latest developer previes and/or Release Candidates.


Best

Klaus

Post Reply