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

XHTML Rebol browser help

 [1/8] from: inetw3::mindspring::com at: 26-Jan-2003 20:42


Hello Reboller's I've put together an XHTML DOM parser in Rebol that automatically build VID's, and one for mBED (multimedia language) to embed my GUI code in all browsers with animation, scores, streamed audio, etc. but....... for the work in progress XHTML browser..... Does anyone know an easy way to change RGB code like this, "#FF00FF00" to a correct tupple color ? Is it possible to make everything in a panel scroll like you see in a browser? And how do you make all your VID code set to a margin so it will automatically wrap for you, or is this not possible? And one more. When my series is built from the html page, i can't just say, " view layout series" and have it just pop up how do i do that? I would really appreciate it if someone could share these tidbits with me if possible. Thanks in advance.

 [2/8] from: carl:cybercraft at: 27-Jan-2003 17:51


On 27-Jan-03, iNetW3 wrote:
> Hello Reboller's > I've put together an XHTML DOM parser in Rebol that automatically
<<quoted lines omitted: 4>>
> Does anyone know an easy way to change RGB code > like this, "#FF00FF00" to a correct tupple color ?
I had a vague feeling there's a function in View to do this, but I may be wrong. Anyway, the following isn't too ungainly...
>> rgb: "#ff00ff00"
== "#ff00ff00"
>> binary: load rejoin ["#{" next rgb "}"]
== #{FF00FF00}
>> to-tuple binary
== 255.0.255.0 Obviously the binary word isn't needed - I just did it that way to show the interim result. This will do it in one...
>> to-tuple load rejoin ["#{" next rgb "}"]
== 255.0.255.0
> Is it possible to make everything in a panel scroll like > you see in a browser?
The short answer is yes, but you'd have to write specific code to do it (I think). Hmmm, I did a test a while back to see how big a layout View can handle. I didn't attempt to make it scroll smoothly, but it definately can handle very big layouts. Will attach the code to the end of this, since it's not too long. ;-)
> And how do you make all your VID code set to a margin > so it will automatically wrap for you, or is this not > possible?
Not sure what you mean by the code "automatically" wrapping. You can make text wrap and you can set a guide so your styles will be in line, but neither of those features seem quite what you mean.
> And one more. When my series is built from the html page, > i can't just say, " view layout series" and have it just pop > up how do i do that?
What type of series is it? If a block, it should work. If it's a string though, (which it could be I guess if it started out as HTML), then you'd need to convert it to a block. ie...
>> series: {text "hello"}
== {text "hello"}
>> view layout series
** Script Error: layout expected specs argument of type: block ** Near: view layout series In that simple case, just a to-block would work. ie... view layout to-block series but with anything complex, you may need to add the block-ends to the string and use load. ie... view layout load rejoin [ "[" series "]" ]
> I would really appreciate it if someone could share these > tidbits with me if possible. Thanks in advance.
This is definately the place to ask. And now for that test script I did, with full apologies for its size. (I know, I know - I don't need any suggestions on how to improve on this, okay?;) REBOL [] inner-lo: layout/offset [ box purple 700x100 "Scrolling Layout Test - 740 x 34492 in size." box yellow 700x100 "First 15x4" box red 700x100 "1" box green 700x200 "2" box blue 700x100 "3" box red 700x100 "4" box green 700x200 "5" box blue 700x100 "6" box red 700x100 "7" box green 700x200 "8" box blue 700x100 "9" box red 700x100 "10" box green 700x200 "11" box blue 700x100 "12" box red 700x100 "13" box green 700x200 "14" box blue 700x100 "15" box red 700x100 "a 1" box green 700x200 "a 2" box blue 700x100 "a 3" box red 700x100 "a 4" box green 700x200 "a 5" box blue 700x100 "a 6" box red 700x100 "a 7" box green 700x200 "a 8" box blue 700x100 "a 9" box red 700x100 "a 10" box green 700x200 "a 11" box blue 700x100 "a 12" box red 700x100 "a 13" box green 700x200 "a 14" box blue 700x100 "a 15" box red 700x100 "b 1" box green 700x200 "b 2" box blue 700x100 "b 3" box red 700x100 "b 4" box green 700x200 "b 5" box blue 700x100 "b 6" box red 700x100 "b 7" box green 700x200 "b 8" box blue 700x100 "b 9" box red 700x100 "b 10" box green 700x200 "b 11" box blue 700x100 "b 12" box red 700x100 "b 13" box green 700x200 "b 14" box blue 700x100 "b 15" box red 700x100 "c 1" box green 700x200 "c 2" box blue 700x100 "c 3" box red 700x100 "c 4" box green 700x200 "c 5" box blue 700x100 "c 6" box red 700x100 "c 7" box green 700x200 "c 8" box blue 700x100 "c 9" box red 700x100 "c 10" box green 700x200 "c 11" box blue 700x100 "c 12" box red 700x100 "c 13" box green 700x200 "c 14" box blue 700x100 "c 15" box yellow 700x100 "Second 15x4" box red 700x100 "1" box green 700x200 "2" box blue 700x100 "3" box red 700x100 "4" box green 700x200 "5" box blue 700x100 "6" box red 700x100 "7" box green 700x200 "8" box blue 700x100 "9" box red 700x100 "10" box green 700x200 "11" box blue 700x100 "12" box red 700x100 "13" box green 700x200 "14" box blue 700x100 "15" box red 700x100 "a 1" box green 700x200 "a 2" box blue 700x100 "a 3" box red 700x100 "a 4" box green 700x200 "a 5" box blue 700x100 "a 6" box red 700x100 "a 7" box green 700x200 "a 8" box blue 700x100 "a 9" box red 700x100 "a 10" box green 700x200 "a 11" box blue 700x100 "a 12" box red 700x100 "a 13" box green 700x200 "a 14" box blue 700x100 "a 15" box red 700x100 "b 1" box green 700x200 "b 2" box blue 700x100 "b 3" box red 700x100 "b 4" box green 700x200 "b 5" box blue 700x100 "b 6" box red 700x100 "b 7" box green 700x200 "b 8" box blue 700x100 "b 9" box red 700x100 "b 10" box green 700x200 "b 11" box blue 700x100 "b 12" box red 700x100 "b 13" box green 700x200 "b 14" box blue 700x100 "b 15" box red 700x100 "c 1" box green 700x200 "c 2" box blue 700x100 "c 3" box red 700x100 "c 4" box green 700x200 "c 5" box blue 700x100 "c 6" box red 700x100 "c 7" box green 700x200 "c 8" box blue 700x100 "c 9" box red 700x100 "c 10" box green 700x200 "c 11" box blue 700x100 "c 12" box red 700x100 "c 13" box green 700x200 "c 14" box blue 700x100 "c 15" box yellow 700x100 "Third 15x4" box red 700x100 "1" box green 700x200 "2" box blue 700x100 "3" box red 700x100 "4" box green 700x200 "5" box blue 700x100 "6" box red 700x100 "7" box green 700x200 "8" box blue 700x100 "9" box red 700x100 "10" box green 700x200 "11" box blue 700x100 "12" box red 700x100 "13" box green 700x200 "14" box blue 700x100 "15" box red 700x100 "a 1" box green 700x200 "a 2" box blue 700x100 "a 3" box red 700x100 "a 4" box green 700x200 "a 5" box blue 700x100 "a 6" box red 700x100 "a 7" box green 700x200 "a 8" box blue 700x100 "a 9" box red 700x100 "a 10" box green 700x200 "a 11" box blue 700x100 "a 12" box red 700x100 "a 13" box green 700x200 "a 14" box blue 700x100 "a 15" box red 700x100 "b 1" box green 700x200 "b 2" box blue 700x100 "b 3" box red 700x100 "b 4" box green 700x200 "b 5" box blue 700x100 "b 6" box red 700x100 "b 7" box green 700x200 "b 8" box blue 700x100 "b 9" box red 700x100 "b 10" box green 700x200 "b 11" box blue 700x100 "b 12" box red 700x100 "b 13" box green 700x200 "b 14" box blue 700x100 "b 15" box red 700x100 "c 1" box green 700x200 "c 2" box blue 700x100 "c 3" box red 700x100 "c 4" box green 700x200 "c 5" box blue 700x100 "c 6" box red 700x100 "c 7" box green 700x200 "c 8" box blue 700x100 "c 9" box red 700x100 "c 10" box green 700x200 "c 11" box blue 700x100 "c 12" box red 700x100 "c 13" box green 700x200 "c 14" box blue 700x100 "c 15" box yellow 700x100 "Forth 15x4" box red 700x100 "1" box green 700x200 "2" box blue 700x100 "3" box red 700x100 "4" box green 700x200 "5" box blue 700x100 "6" box red 700x100 "7" box green 700x200 "8" box blue 700x100 "9" box red 700x100 "10" box green 700x200 "11" box blue 700x100 "12" box red 700x100 "13" box green 700x200 "14" box blue 700x100 "15" box red 700x100 "a 1" box green 700x200 "a 2" box blue 700x100 "a 3" box red 700x100 "a 4" box green 700x200 "a 5" box blue 700x100 "a 6" box red 700x100 "a 7" box green 700x200 "a 8" box blue 700x100 "a 9" box red 700x100 "a 10" box green 700x200 "a 11" box blue 700x100 "a 12" box red 700x100 "a 13" box green 700x200 "a 14" box blue 700x100 "a 15" box red 700x100 "b 1" box green 700x200 "b 2" box blue 700x100 "b 3" box red 700x100 "b 4" box green 700x200 "b 5" box blue 700x100 "b 6" box red 700x100 "b 7" box green 700x200 "b 8" box blue 700x100 "b 9" box red 700x100 "b 10" box green 700x200 "b 11" box blue 700x100 "b 12" box red 700x100 "b 13" box green 700x200 "b 14" box blue 700x100 "b 15" box red 700x100 "c 1" box green 700x200 "c 2" box blue 700x100 "c 3" box red 700x100 "c 4" box green 700x200 "c 5" box blue 700x100 "c 6" box red 700x100 "c 7" box green 700x200 "c 8" box blue 700x100 "c 9" box red 700x100 "c 10" box green 700x200 "c 11" box blue 700x100 "c 12" box red 700x100 "c 13" box green 700x200 "c 14" box blue 700x100 "c 15" ] 0x0 outer-lo: layout [ page: box black 700x200 across button "Up" [inner-lo/offset/y: inner-lo/offset/y + 100 show page] button "Down" [inner-lo/offset/y: inner-lo/offset/y - 100 show page] ] page/pane: inner-lo view outer-lo -- Carl Read

 [3/8] from: anton:lexicon at: 27-Jan-2003 15:41


- Convert an RGB code such as "#FF00EE11" to a tuple: to-tuple repeat n 4 [ append [] to-integer copy/part at #FF00EE11 n * 2 - 1 2 ] If you actually have "#FF00EE11" in a string like that then use load: load "#FF00EE11" - Check out this demo for a scrolling grid: http://www.codeconscious.com/rebsite/face-grid-demo2.r - I haven't seen an easy way to do automatic wrap in a VID layout. Perhaps you should read source of layout. - Show us an example of your series. It should be a block of vid code, so maybe you are not building it correctly. Anton.

 [4/8] from: greggirwin:mindspring at: 27-Jan-2003 2:02


Hi Anton, A> - Convert an RGB code such as "#FF00EE11" to a tuple: How about: to-tuple debase/base #FF00EE11 16 -- Gregg

 [5/8] from: carl:cybercraft at: 27-Jan-2003 22:51


On 27-Jan-03, Gregg Irwin wrote:
> Hi Anton, >> - Convert an RGB code such as "#FF00EE11" to a tuple: > How about: to-tuple debase/base #FF00EE11 16
Because it returns the wrong results, perhaps? ...
>> to-tuple debase/base #FF00EE11 16
== 238.17.0 By my reckoning, it should return a four value tuple, with the first value being 255. Or am I missing something? -- Carl Read

 [6/8] from: petr:krenzelok:trz:cz at: 27-Jan-2003 11:14


Carl Read wrote:
>On 27-Jan-03, Gregg Irwin wrote: >>Hi Anton,
<<quoted lines omitted: 13>>
>By my reckoning, it should return a four value tuple, with the first >value being 255. Or am I missing something?
View 1.2.8: ->> to-tuple debase/base #FF00EE11 16 == 255.0.238.17 -pekr-

 [7/8] from: sunandadh:aol at: 27-Jan-2003 5:22


Carl:
> >> to-tuple debase/base #FF00EE11 16 > == 238.17.0 > > By my reckoning, it should return a four value tuple, with the first > value being 255. Or am I missing something?
It works from where I am:
>> to-tuple debase/base #FF00EE11 16
== 255.0.238.17 But enbase and debase were/are notoriously buggy. This is definitely one instance where your mileage has varied. Maybe a later release or beta will work on your platform. Sunanda.

 [8/8] from: carl:cybercraft at: 28-Jan-2003 8:05


On 27-Jan-03, Petr Krenzelok wrote:
> Carl Read wrote: >>>> to-tuple debase/base #FF00EE11 16
<<quoted lines omitted: 7>>
> ->> to-tuple debase/base #FF00EE11 16 > == 255.0.238.17
Ah. The sooner we get the next non-beta release the better, I think. Way too many conflicts are appearing of late. -- Carl Read

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