Okay, here's my little prototype for a Table module: http://pastie.org/238347
Ideally it would use a monospaced font, and I couldn't get the top/bottom borders inside the cells, but it's almost there, -tieg On Mon, Jul 21, 2008 at 11:59 PM, Tieg Zaharia <[EMAIL PROTECTED]> wrote: > Not sure if this is known or not, but I think the code() method is broken > (and some other ones, like sub() and sup())? On the stable commit for > Leopard, they don't produce any output for me (or errors), > -tieg > > > On Mon, Jul 21, 2008 at 4:53 PM, jerry anning <[EMAIL PROTECTED]> wrote: > >> Nice, Emanuel. Based on this, it seems to me that you could put the texts >> or whatever in a two dimensional array and calculate the max length of each >> column from that. You could also calculate max height for rows the same way. >> You could then use the array of max heights and max widths you generate to >> generate the rows and columns in the needed sizes and insert the data on the >> fly. You could even use these sizes to generate lines above, below, and on >> either side of the text rows and columns in the right sizes to give the >> table boxes apparent borders. It would be ugly and messy, but you could wrap >> it up in function(s) in a separate module and your app proper would still >> look reasonably nice. Unfortunately, I don't think this would very easily >> let you autoresize, but with careful use of repaint it might be possible. >> >> >> On Mon, Jul 21, 2008 at 3:57 PM, Tieg Zaharia <[EMAIL PROTECTED]> >> wrote: >> >>> Killer! Thanks for the help my friends. >>> >>> On Mon, Jul 21, 2008 at 3:35 PM, Emanuel Carnevale < >>> [EMAIL PROTECTED]> wrote: >>> >>>> >>>> >>>> On Mon, Jul 21, 2008 at 8:43 PM, jerry anning <[EMAIL PROTECTED]> >>>> wrote: >>>> >>>>> OK, but the table produced is the transpose of what I was trying for. >>>>> >>>> >>>> Ah, I see... sorry, but I didn't have your target in mind, for me was >>>> easier thinking for rows. >>>> >>>> >>>>> My idea was that the inner stacks would form the columns and the flow >>>>> would line them up next to each other. I hoped that the column-stacks >>>>> would >>>>> give me the desired horizontal autosizing. The outermost stack was >>>>> intended >>>>> simply to put the close button below the table (if it had worked). >>>>> >>>> >>>> this one works and is even better looking! >>>> http://pastie.org/238053 >>>> >>>> actually I love it! :) >>>> >>>> >>>> >>>>> >>>>> >>>>> On Mon, Jul 21, 2008 at 2:30 PM, Emanuel Carnevale < >>>>> [EMAIL PROTECTED]> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Mon, Jul 21, 2008 at 7:57 PM, jerry anning <[EMAIL PROTECTED]> >>>>>> wrote: >>>>>> >>>>>>> i tried the obvious stack and flow method of making a table, shown in >>>>>>> this pastie: >>>>>>> http://pastie.org/237981 >>>>>>> but it did not work. I just got all of the paras in a stack. I also >>>>>>> tried wrapping each para in an individual flow with a view to adding >>>>>>> graphical delimiters to create boxes later, and got the same result. My >>>>>>> primary logic capacitor is burned out today, so can someone tell me why >>>>>>> this >>>>>>> doesn't work? >>>>>>> >>>>>> >>>>>> Instead of stack, flow, stack, >>>>>> try >>>>>> stack, flow >>>>>> >>>>>> here: >>>>>> >>>>>> http://pastie.org/238006 >>>>>> >>>>>> now, we should find some way to have all of the slots the same width. >>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Jul 21, 2008 at 10:27 AM, Emanuel Carnevale < >>>>>>> [EMAIL PROTECTED]> wrote: >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Jul 21, 2008 at 4:16 PM, Tieg Zaharia < >>>>>>>> [EMAIL PROTECTED]> wrote: >>>>>>>> >>>>>>>>> Just wondering if anyone's come up with a good workaround to get >>>>>>>>> html-ish tables in Shoes? I have a good case for tabular data, but I >>>>>>>>> haven't >>>>>>>>> figured out how to make 'columns' and get them to stretch to the >>>>>>>>> contents' >>>>>>>>> size yet, >>>>>>>>> >>>>>>>> >>>>>>>> what about a table made of stack and flows? if we hide everything >>>>>>>> behind a class could be cool.you can add anything to a canvas, even >>>>>>>> images. >>>>>>>> >>>>>>>> Emanuel >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >
