HTML simple question ? 
Author Message
 HTML simple question ?

Hi all,

Is there any way in Dolphin to display aString (in HTML format) in
aURLPresenter without creating a File on hard drive ?

Regards
Bruno



Tue, 07 Jun 2005 07:22:13 GMT  
 HTML simple question ?
Hi all,

Is there any way in Dolphin to display aString (in HTML format) in
aURLPresenter without creating a File on hard drive ?

Regards
Bruno



Tue, 07 Jun 2005 07:22:13 GMT  
 HTML simple question ?
Bruno,

Quote:
> Is there any way in Dolphin to display aString (in HTML format) in
> aURLPresenter without creating a File on hard drive ?

Dolphin's TipOfTheDay class uses the following type of approach, though I
believe the string's size should be no greater than 1,000 or so.

URLPresenter showOn: 'about: <h2>Hello</h2><h1>there</h1>'.

-- Louis



Tue, 07 Jun 2005 07:59:29 GMT  
 HTML simple question ?

Quote:

> Bruno,

>> Is there any way in Dolphin to display aString (in HTML format) in
>> aURLPresenter without creating a File on hard drive ?

> Dolphin's TipOfTheDay class uses the following type of approach,
> though I believe the string's size should be no greater than 1,000 or
> so.

> URLPresenter showOn: 'about: <h2>Hello</h2><h1>there</h1>'.

> -- Louis

If this is a limitation, you can use the document's IPersistStreamInit
interface. An example would be;

   pPersistStream := self document queryInterface: IPersistStreamInit.
   pStream := (IStream onHGLOBAL) nextPutAll: aString asByteArray;
reset;yourself.
   pPersistStream initNew.
   pPersistStream Load: pStream

Where document is accessed via;
    self view controlDispatch document

One limitation of this method is that no host is set into the document and
therefore relative hrefs can not be resolved. As I understand it, if you
need to load a string as if it was obtained from a certain url, you need to
implement a URLMoniker.

Steve

--
Steve Waring

About: http://www.dolphinharbor.org/dh/harbor/steve.html
Journal: http://www.stevewaring.net/blog/home/index.html



Tue, 07 Jun 2005 13:28:50 GMT  
 HTML simple question ?

Quote:
> Hi all,

> Is there any way in Dolphin to display aString (in HTML format) in
> aURLPresenter without creating a File on hard drive ?

     presenter := URLPresenter createIn: shell.
     browser := presenter view controlDispatch.
     "We must wait until the browser has loaded the blank document..."
     [browser readyState == READYSTATE_COMPLETE]
        whileFalse: [SessionManager inputState pumpMessages].
     "... and then we can stuff in the HTML"
     browser document body innerHTML: stream contents

HTH

Blair



Tue, 07 Jun 2005 21:21:07 GMT  
 HTML simple question ?
Thanks every one.



Quote:


> > Hi all,

> > Is there any way in Dolphin to display aString (in HTML format) in
> > aURLPresenter without creating a File on hard drive ?

>      presenter := URLPresenter createIn: shell.
>      browser := presenter view controlDispatch.
>      "We must wait until the browser has loaded the blank document..."
>      [browser readyState == READYSTATE_COMPLETE]
>         whileFalse: [SessionManager inputState pumpMessages].
>      "... and then we can stuff in the HTML"
>      browser document body innerHTML: stream contents

> HTH

> Blair



Wed, 08 Jun 2005 11:09:41 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Awk sub command -simple question for html

2. Simple Question - Run .php form an html directory

3. Simple question: Extracting Links from HTML

4. Question in french (a simple question, very simple)

5. Simple forth question - maybe simple ?

6. Simple Question seeks simple answer

7. Once again: Simple but robust HTML parsing

8. Simple HTML classes

9. Simple HTML template modules?

10. Simple HTML to XML parser?

11. simple HTML to XML converter

12. : A simple wrapper for embeeding Python in HTML

 

 
Powered by phpBB® Forum Software