Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Newbie script: A Rebol web browser - help please

From: ryanc:iesco-dms at: 10-Jan-2002 9:52

You might check out the web browser I made a while back ago to get an understanding of just how big a web browser project is. I concluded doing it right is a big project, even for a text only browser. I think the trick to doing it is to have the display code largely seperated from the html parsing code--unlike mine. Three step conversion, html to document object model (DOM) to viewer. I would expect most browsers these days work that way as well. Once you have the dom mapped, the display part is straight forward. --Ryan Carl Read wrote:
> On 10-Jan-02, Scott Rebol wrote: > > > In View goto: > > > > > > Currently I have a hardcoded home page and a location > > box that allow you to put in a url with an external > > document that is basically a view layout. > > > The external layout loads into a pane of a fixed with > > browser window. > > > > > > > > > > Are my "web" documents. > > > Note: I currently only have hyperlinks working as > > buttons. > > Anton showed you how to have text hyperlinks, but note there's > currently no easy way in View to have a hyperlink within plain text. > (Just to stop you wasting a lot of time looking for something that's > not there.) Some on the list here have been developing ways to do > this though, if my memory serves me right. > > > And when you use them it doesn't update the > > loction bar. > > That's easy to do... > > view layout [ > f: field "Initial text" > button "Change Text" [clear f/text append f/text "New text" show > f] > button "Append Text" [append f/text " more" show f] > button "Clear Text" [clear f/text show f] > ] > > > But still there is a lot of fuctionality > > for 1.19 KB of code. > > > Next step is building a script that converts HTML to > > rebolview layout, > > Why would you want to do this? I can think of lots of answers, but if > it's to try and convert any webpage to a View layout then you have > your work cut out for you. There is a simple Web-browser written in > View though - see it on the FX5 Rebsite (via Sites in the View > Desktop.) > > If it's to convert your own HTML though, then that's a different > matter - you're in control of everything, which makes things easier. > Using REBOL's parsing ability would be the way to go - see the Core > Guide chapter on parsing. (Don't expect to learn it in five minutes > though - you may be trying to run before you can walk here.) > > One possible approach for you would be to first use 'to-block on your > webpage. This will create a block where the html tags have been > converted into REBOL's tag datatype and the rest of the stuff in the > page into various other datatype forms - some will be words, others > string, and so on. (You may get an error with this though, as > 'to-block can't handle everything you throw at it.) You could then > use 'parse (and the rules you've created for 'parse to use) to > convert the block into your layout. Not as easy as it sounds, but > there'd be many hours of fun for you trying to get it to work. (: > > > Does anyone have open code that does > > this. Or if not does anyone have an example of a file > > format converter I can study. > > > Also if people could post rebol layout files on > > otherservers could they send me url. So I can test > > that this works across webservers. > > The way you've done it would work across the Net. As long as you use > a full URL and the file's there, a REBOL script can grab it and use > it. > > -- > Carl Read > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst 707-468-5400 The contradiction so puzzling to the ordinary way of thinking comes from the fact that we have to use language to communicate our inner experience which in its very nature transcends lingistics. -D.T. Suzuki