Louis Sumberg wrote:
> 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
Email:
[hidden email]
About:
http://www.dolphinharbor.org/dh/harbor/steve.htmlJournal:
http://www.stevewaring.net/blog/home/index.html