Real Software Forums
http://forums.realsoftware.com/

ShowURL works differently in Linux
http://forums.realsoftware.com/viewtopic.php?f=8&t=34043
Page 1 of 1

Author:  grechcj [ Mon May 31, 2010 5:30 am ]
Post subject:  ShowURL works differently in Linux

This works on Windows and Mac but not Linux

filepath = "http://www.google.com.au/index.html"
ShowURL filepath


Linux opens the default browser but cant connect. The address bar reads -
file:///home/Jenny/Documents/http://www.google.com.au/index.html

Why does it think the page is in my Documents folder?

(RB2009 R2)

[Edit]
Mandriva 2010 / Firefox 3.6 (Doesn't work with Konqueror either)

Author:  v-man [ Wed Jun 09, 2010 5:45 am ]
Post subject:  Re: ShowURL works differently in Linux

I have discovered the same issue. My workaround is to create a html file and launch that file.

dim clp as new Clipboard
dim f as FolderItem
dim s as string
Dim iniStream as BinaryStream
Dim i as Integer



f = GetFolderItem ( "tmp.html" )
s = "<head>"
s = s + "Redirect to http://www.vman.cc"
s = s + "<meta http-equiv=""" + "refresh" +"""" +"content="+"""" + "0; URL=http://www.vman.cc"""+">"
s = s + "</head>"

iniStream=f.CreateBinaryFile("")
iniStream.WritePString(s)
iniStream.Close



if TargetWin32 then

f = GetFolderItem("tmp.html")
if f <> nil then
f.Launch
else
//MsgBox("Can't locate contact.html in Application Folder")
end
end

if TargetLinux then
f = GetFolderItem("tmp.html")
if f <> nil then
f.Launch
else
//MsgBox("Can't locate contact.html in Application Folder")
end
end

if TargetMacOS then
f = GetFolderItem("")
s = f.AbsolutePath
s = s + "tmp.html"
f = nil
f = GetFolderItem(s)

if f <> nil then
f.Launch
else
//MsgBox("Can't locate contact.html in Application Folder")
end
end

Author:  npalardy [ Wed Jun 09, 2010 11:05 am ]
Post subject:  Re: ShowURL works differently in Linux

hmmmmmmmm
Ubuntu 9.10 and 9.04 are OK here using Firefox

Author:  grechcj [ Mon Jun 14, 2010 4:15 am ]
Post subject:  Re: ShowURL works differently in Linux

Thanks V-man.
I put your code in a function and passed the URL address to it.
I don't know why it works with some Linux OS and not others but at least this method works for all I've tried so far.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/