On Fri, Oct 22, 2004 at 07:49:18PM +0900, Stefan Schmiedl wrote:
> On Fri, 22 Oct 2004 18:13:24 +0900,
> Michael Neumann <mneumann / ntecs.de> wrote:
> >> 
> >> Who does all of this drawing? It looks like some unknown power is doing
> >> (and knowing) way too much.
> >
> > The component! For example the button component has to draw itself onto
> > the screen, for which it needs a canvas. 
> 
> Aha. I actually did not get this. Not only am I losing hair, I'm also
> getting stupid. What a nice way to start into the weekend :-/

oooh, sorry ;)

> > Hm, but somewhere you have to implement how the component looks like, no?
> > The above is equivalent to:
> >
> >   cgi.table {
> >     cgi.tr {
> >       cgi.td { ... } +
> >       cgi.td { ... }
> >     }
> >   }
> >
> 
> Well, I'm not happy with the way the cgi stuff is handled, either.
> But maybe that's because my brain is in Forth mode currently.

In Forth of course that looks pretty much like HTML:

  : <HTML>   ." <HTML>" ;
  : </HTML>  ." </HTML>" ;
  : <TABLE> ." <TABLE>" ;
  ...
  <HTML>
  <TABLE> ." blah " </TABLE> 
  </HTML>

Enjoy: http://www.ntecs.de/old-hp/uu9r/lang/html/forth.en.html :) 


> > But in a more imperatively fashion, similar as for drawing a GUI on the
> > canvas, where you don't do this ('+'):
> >
> >   canvas.box(...) {
> >     canvas.line(1, 1, 10, 10) +
> >     canvas.line(...) +
> >     ...
> >   }
> 
> Not when you're drawing stuff. But if you're doing widget layout with a
> layout manager, you are at least doing this in spirit, if not in fact.

Yes. The layout manager will do that for you. 

> But what's more important now, is to go get Alexander from the
> kindergarten ... it's his 5th birthday, you know.

happy happy birthday (does he speak forth, too? :)

Regards,

  Michael