Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

ShowURL (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: VB Support: forward to the past?
Next thread: TextField CueText


Re: RB Company.   -   Rubber Chicken Software Co.
  ShowURL   -   Louis G5 Batayte
   Re: ShowURL   -   Louis G5 Batayte
   Re: ShowURL   -   Tim Jones
   Re: ShowURL   -   Sven E Olsson
   Re: ShowURL   -   Louis G5 Batayte
   Re: ShowURL   -   Louis G5 Batayte
   Re: ShowURL   -   Louis G5 Batayte
   Re: ShowURL   -   Arnaud Nicolet
   Re: ShowURL   -   Christian Schmitz
   Re: ShowURL   -   Tim Jones
   Getting ListBox Cell Left and Top   -   Rubber Chicken Software Co.

ShowURL
Date: 05.08.09 19:46 (Wed, 5 Aug 2009 14:46:57 -0400)
From: Louis G5 Batayte

When I paste the following string ( file:///Users/louis/SimpleSample.html
) into the URL line of a Browser page, I get the html in that file
displayed in the Browser window.

When I put that string into the RB command ShowURL, i.e. ShowURL "file:///Users/louis/SimpleSample.html
" , it opens the file in text edit. Is there a way to get ShowURL or
any other technique to get a Browser to display the contents of that
file from inside RB? I tried a little to figure out how to launch
Safari from a shell, but was unsuccessful.

Thanks,
Lou

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 06.08.09 01:46 (Wed, 5 Aug 2009 20:46:09 -0400)
From: Louis G5 Batayte

On Aug 5, 2009, at 5:10 PM, Tim Jones wrote:

> On Aug 5, 2009, at 1:33 PM, Louis G5 Batayte wrote:
>
>> My next question is how do I set the "Open With" information for a
>> file I create in RB?
>
> Don't set them to anything and let the .html extension point the way.
>
> Tim
>
Thanks All,

The problem, as Tim pointed out in his first posting, it doesn't
matter what the extension is, what apparently matters is what the
file's "Open With" is set to. Now to clarify, I am creating the HTML
file myself in RB. I wanted to display this in a Browser in addition
to the HTMLviewer. With Sven's post of: f.MacCreator = "sfri" for
Safari, I tried this and it worked. With a little more digging I found
that to get the Mac Creator code of an Application you do:
1: locate the application
2: Right click on it and select "Show Package Contents"
3. drill down in the folders and find the text file Pkginfo
4. double click on it to open it in Text Edit
5. There are 8 characters in this file" AAPLxxxx, the xxxx is the
Creator code

So for:
Safari = "sfri"
Opera = "OPRA"
Camino = "MOZC"
Firefox = "MOZB"

udog does not appear to work anymore, Using this creator, the text
editor launches

my Browser code does this (simplified):

Dim f as folderitem
Dim t as TextOutputStream

f = New
FolderItem( SpecialFolder.UserHome.Child( "SimpleSample.html" ) )
t = f.CreateTextFile()
t.Write Sout // write out the string, Sout, /901 that contains all
the HTML code
t.Close

f.MacType = "TEXT"
f.MacCreator = "sfri" // Safari Browser
//f.MacCreator = "OPRA" // Opera Browser
//f.MacCreator = "MOZC" // Camino
//f.MacCreator = "MOZB" // Firefox
//f.MacCreator = "udog" //Default ?-- Does not work - opens
text edit

ShowURL f.URLPath // it now works!
f = Nil

Once Again,
Thanks All
Lou

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 22:10 (Wed, 5 Aug 2009 14:10:48 -0700)
From: Tim Jones
On Aug 5, 2009, at 1:33 PM, Louis G5 Batayte wrote:

> My next question is how do I set the "Open With" information for a
> file I create in RB?

Don't set them to anything and let the .html extension point the way.

Tim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 22:09 (Wed, 5 Aug 2009 23:09:11 +0200)
From: Sven E Olsson

On 2009-08-05, at 22:33 , Louis G5 Batayte wrote:

>
> My next question is how do I set the "Open With" information for a
> file I create in RB?
>
> Thanks,
> Lou
>

Hi,
I think you are on a Mac, when you talk about TextEdit..

You have to use the folderitem.MacCreator like:

f.MacCreator = "sfri" for Safari

A file with MacType "TEXT" and MacCreator "udog" is opening in the
default browser ( in my case Safari )

Note:
If a file is downloaded using the RB HTTPSocket, REALbasic set the
MacCreator to "ttxt" by default ( I don't understand why ). That means
that the downloaded html file is opening in TextEdit when double click
on the icon. ( or use ShowUrl/folderitem.launch )

So there is a need to set the correct MacCreator.

----------------------------------------------------------------------
SEEdit Maxi - THE XHTML EDITOR FOR MACINTOSH
http://seeditmaxi.cachefly.net



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 21:53 (Wed, 5 Aug 2009 16:53:23 -0400)
From: Louis G5 Batayte

On Aug 5, 2009, at 3:04 PM, Christian Schmitz wrote:

>
> Am 05.08.2009 um 20:46 schrieb Louis G5 Batayte:
>
>>
>> When I paste the following string ( file:///Users/louis/SimpleSample.html
>> ) into the URL line of a Browser page
>
> set the creator/type codes correctly.
>
> I think it was creator "udog" and type "HTML" for using the default
> browser.
>
> Greetings
> Christian
>
I tried those, and it didn't help.

I created a file using Safari and right click save page.
The MacCreator and MacType were both Null characters, yet the Open
With was set to Safari

thanks Christian for the effort
Lou

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 21:33 (Wed, 5 Aug 2009 16:33:32 -0400)
From: Louis G5 Batayte

On Aug 5, 2009, at 3:09 PM, Arnaud Nicolet wrote:

> Le 5 août 09 à 20:55, Tim Jones a écrit:
>
>> On Aug 5, 2009, at 11:46 AM, Louis G5 Batayte wrote:
>>
>>> When I paste the following string ( file:///Users/louis/SimpleSample.html
>>> ) into the URL line of a Browser page, I get the html in that
>>> file displayed in the Browser window.
>>>
>>> When I put that string into the RB command ShowURL, i.e. ShowURL "file:///Users/louis/SimpleSample.html
>>> " , it opens the file in text edit. Is there a way to get ShowURL
>>> or any other technique to get a Browser to display the contents of
>>> that file from inside RB? I tried a little to figure out how to
>>> launch Safari from a shell, but was unsuccessful.
>>
>> Was TextEdit the last app that you opened an HTML file with? If
>> so, Finder may think that this is the default app for HTML files.
>> Check your file with the "Open With..." option and see what Finder
>> thinks the files dhould be opened with TextEdit.
>
> I thought ShowURL was supposed to launch the most significant
> application for the kind of URL ("http:" in Safari, "mailto:" in
> Mail...) so "file:" seems logically opened like a real file double-
> clicked in the Finder. I'm wrong?

I was beginning to think that showURL was looking at it as a text file
and thus opened it with text edit.
When I used "Get Info" in the finder to set the open with to Safari,
then showURL opened it with Safari.
Which is what would have happened with a double click in the finder.

My next question is how do I set the "Open With" information for a
file I create in RB?

Thanks,
Lou

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 20:10 (Wed, 5 Aug 2009 15:10:46 -0400)
From: Louis G5 Batayte


On Aug 5, 2009, at 2:55 PM, Tim Jones wrote:

> On Aug 5, 2009, at 11:46 AM, Louis G5 Batayte wrote:
>
>> When I paste the following string ( file:///Users/louis/SimpleSample.html
>> ) into the URL line of a Browser page, I get the html in that file
>> displayed in the Browser window.
>>
>> When I put that string into the RB command ShowURL, i.e. ShowURL "file:///Users/louis/SimpleSample.html
>> " , it opens the file in text edit. Is there a way to get ShowURL
>> or any other technique to get a Browser to display the contents of
>> that file from inside RB? I tried a little to figure out how to
>> launch Safari from a shell, but was unsuccessful.
>
> Was TextEdit the last app that you opened an HTML file with? If so,
> Finder may think that this is the default app for HTML files. Check
> your file with the "Open With..." option and see what Finder thinks
> the files dhould be opened with TextEdit.
>
> HTH,
> Tim
>

Thanks Tim,
That was exactly the problem. Gotta love this group!!

Lou

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 20:09 (Wed, 05 Aug 2009 21:09:58 +0200)
From: Arnaud Nicolet
Le 5 août 09 à 20:55, Tim Jones a écrit:

> On Aug 5, 2009, at 11:46 AM, Louis G5 Batayte wrote:
>
>> When I paste the following string ( file:///Users/louis/
>> SimpleSample.html ) into the URL line of a Browser page, I get the
>> html in that file displayed in the Browser window.
>>
>> When I put that string into the RB command ShowURL, i.e. ShowURL
>> "file:///Users/louis/SimpleSample.html" , it opens the file in
>> text edit. Is there a way to get ShowURL or any other technique to
>> get a Browser to display the contents of that file from inside RB?
>> I tried a little to figure out how to launch Safari from a shell,
>> but was unsuccessful.
>
> Was TextEdit the last app that you opened an HTML file with? If
> so, Finder may think that this is the default app for HTML files.
> Check your file with the "Open With..." option and see what Finder
> thinks the files dhould be opened with TextEdit.

I thought ShowURL was supposed to launch the most significant
application for the kind of URL ("http:" in Safari, "mailto:" in
Mail...) so "file:" seems logically opened like a real file double-
clicked in the Finder. I'm wrong?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 20:04 (Wed, 5 Aug 2009 21:04:30 +0200)
From: Christian Schmitz

Am 05.08.2009 um 20:46 schrieb Louis G5 Batayte:

>
> When I paste the following string ( file:///Users/louis/SimpleSample.html
> ) into the URL line of a Browser page

set the creator/type codes correctly.

I think it was creator "udog" and type "HTML" for using the default
browser.

Greetings
Christian


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ShowURL
Date: 05.08.09 19:55 (Wed, 5 Aug 2009 11:55:46 -0700)
From: Tim Jones
On Aug 5, 2009, at 11:46 AM, Louis G5 Batayte wrote:

> When I paste the following string ( file:///Users/louis/
> SimpleSample.html ) into the URL line of a Browser page, I get the
> html in that file displayed in the Browser window.
>
> When I put that string into the RB command ShowURL, i.e. ShowURL
> "file:///Users/louis/SimpleSample.html" , it opens the file in text
> edit. Is there a way to get ShowURL or any other technique to get a
> Browser to display the contents of that file from inside RB? I
> tried a little to figure out how to launch Safari from a shell, but
> was unsuccessful.

Was TextEdit the last app that you opened an HTML file with? If so,
Finder may think that this is the default app for HTML files. Check
your file with the "Open With..." option and see what Finder thinks
the files dhould be opened with TextEdit.

HTH,
Tim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>