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

rebol browser???

 [1/5] from: izkata:aol at: 27-Mar-2002 13:42


Has anyone made an actual rebol browser? If not, I think I have an idea. Ever seen that file viewer, the one where you can't edit the words? Maybe, if that's combined with Websplit.r, and some way for buttons to represent hyperlinks, rebol would have it's own browser. I'm working on something like that, but I don't know how to make scrollbars. Can anyone help? Daniel S.

 [2/5] from: ryanc::iesco-dms::com at: 27-Mar-2002 11:24


I was looking into it at one time. Just goofing around one night I scribbled this up: http://www.sonic.net/~gaia/projects/web.r Taking it for a test drive might enlighten you on some of the many issues a browser faces these days. If I was to make a real one, I would approach it first by creating the Document Object Model. I would create a dialect that manipulates and renders the DOM, and parses HTML. The rest is made up by contributers who make small adjustments and advancements to the HTML parser using the DOM maniputlation dialect. I make it sound easy, but its actually a very difficult project. You also must consider that most sites on the internet are not sympathetic to non javascript/flash/CSS/frames browsers. --Ryan [Izkata--aol--com] wrote:
> Has anyone made an actual rebol browser? > If not, I think I have an idea. Ever seen that
<<quoted lines omitted: 9>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Note: When sending me email directly, always make sure to include my name in the message, otherwise my aggressive spam filters may trash it.

 [3/5] from: gchiu:compkarori at: 28-Mar-2002 12:35


On Wed, 27 Mar 2002 13:42:26 EST [Izkata--aol--com] wrote:
> Has anyone made an actual rebol browser?
There's one on the FX-5 rebsite -- Graham Chiu

 [4/5] from: izkata:aol at: 28-Mar-2002 12:51


Now that I've tried at it, is this a good start? REBOL [] prin "^(page)" [if not connected? [alert "Not connected to the Internet!" quit]] flash "Loading..." if not exists? %Browserfiles/ [make-dir %Browserfiles/] either exists? %BrowserFiles/Mem.txt [ do %BrowserFiles/Mem.txt ][ Homepage: http://www.msn.com/ Favepage: http://www.msn.com/ favcolor: black ] updatemem: [write %BrowserFiles/Mem.txt rejoin [{REBOL [] Homepage: } Homepage { Favepage: } Favepage { favcolor: } favcolor] do %Browser.r ] browsepage: func [dapage [url! file!]][ A: read dapage write %page.txt {REBOL [] page: layout [ across backcolor favcolor } replace/all A "<P>" {return } replace/all A "<BR>" {return } replace/all A "&nbsp;" { } tags: make block! 100 text: make string! 8000 html-code: [ copy tag ["<title>" thru "</title>"] (append tags tag) | copy tag ["<" thru ">"] (append tags tag) | copy txt to "<" (append text rejoin ["text {" txt "} "]) ] parse A [to "<" some html-code] text: replace/all text "return" "} return text {" write/append %Page.txt rejoin [text {]}] ] webaddres: Homepage browsepage webaddres typic: does [ do %page.txt panels/pane: page size: size-text panels ] main: layout [ across backcolor favcolor button 100x100 "Make this page your Homepage." [Homepage: webaddres do updatemem] button 100x100 "Make this page your Favorite page." [Favepage: webaddres do updatemem] button 100x100 "Change Color." [favcolor: request-color do updatemem] button 100x100 "Goto homepage." [browsepage homepage typic show panels] button 100x100 "Goto favorite page." [browsepage favepage typic show panels] button 100x100 "Quit." [quit] return button 640x25 "New Web Address." [if error? try [ browsepage to-url request-text/title "Web Address:" typic show panels ][ browsepage http://www.msn.com/ ]] return panels: box 640x350 favcolor s1: slider 16x350 [ panels/para/scroll/y: s1/data - 1 * (negate size/y) - size/y + 2 show panels ] return s2: slider 640x16 [ panels/para/scroll/x: s2/data - 1 * (negate size/x) - size/x + 2 show panels ] ] typic request main Well? Is it a good start? Daniel S.

 [5/5] from: anton:lexicon at: 29-Mar-2002 17:36


Daniel, I tried this program but I was unable to make this browser show anything. From looking at the source, it appears that you are intending for the contents of a web page to be inserted into the box's pane. I would suggest that your program should have an address field, and an info field at the bottom that shows the user what is going on when you press the buttons. Also, you should make sure that all your windows are closed when the program exits. Use unview/all. I don't see a good reason why you need to save a program to a file and do it just to layout some faces. I would simply do it all in memory. If I wanted to look at the source, then I would implement a button "show source" [ view/new src-lay: layout compose [area (form src)] ] where src is the source text. (And don't forget to unview/only src-lay later.) I think you may not be aware of compose. You can compose a new layout block like this (assuming text is a block of strings): blk: copy [backdrop gray across] foreach str text [ append blk compose [text (str)] ] layout blk Regards, Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted