[ENH]Html table (third version)

Karl Ramberg karl.ramberg at chello.se
Tue Sep 4 19:17:35 UTC 2001


Lex Spoon wrote:
> 
> > My problem ocurred when TD not could contain TABLES, therefor I changed
> > the mayContain to return true and got into all kind of truble.
> > I fixed this in the third version I posted and it works the way it
> > should
> > now.
> 
> Ah, good example.  It seems that HtmlTable's are currently neither
> "block entities" nor "textual entities", and thus are trying to be
> at the top-level of the document.  Adding isBlockEntity to return true
> would make sense, and it would seem to fix this particular problem
> as well as others.
I made it return true to isTable. 
> 
> >       nuFormatter _ HtmlFormatter preferredFormatterClass new. "set up a new  formatter"
> >       nuFormatter browser: formatter browser.
> >       nuFormatter baseUrl: formatter baseUrl.
> >       1 to: (contents size) do:[:i| nuDocument _ contents at: i.
> >                       nuDocument addToFormatter: nuFormatter. ]. " feed the formatter with
> > whatever is present"
> 
> Ahh, you create a new formatter for each cell.  That should work okay,
> though it doesn't inherit any settings from the current formatter
> except for ones you copy explicitly.
And its kind of slow... but it gives the advantage of using the 
morphic table layout. I also fixed somestuff with TextMorph so 
embedded morphs show up, hopefully.
> But, it certainly sounds good enough as is to be very useful!  Yay Karl!

It works now, exept the darn row and coll span stuff... and the layout
does not pay attention to attributes like borders and spacing etc. yet.

Oh, an other thing that don't work is tiled pictures, like the top and bottom
line in the table on the Squeak Swiki. 


Karl




More information about the Squeak-dev mailing list