- when I read the code of FTmorph I was thinking that a lot of it has not much 
to do with UI but looks like a model :).

this is not a question :)

I know it was more a general feeling that I wanted to share with you
in the case of rowHeight, it determines how the row looks (and not what it 
shows) then is UI (IMO)… anyway I’m aware this is not 100% MVC but knowing the 
height of rows is very important to calculate in a fast way how many rows fit 
and get the rows from datasource (an operation that happens a lot so is 
convenient to have it as fast as possible (at least in a “fast table”).
this do not supports variable height but that can be achieved by extending the 
table without compromising the performance of the parent(just very few 
use-cases need a variable height table).

So it means that you could get a default for the first computation = for exemple it tells you that you will have 2- rows then for the displays you could use the real size of each rows and the default row is smaller than the actual size then this is not a problem because you will get less
rows.

- if I were about to manage the height of a row based on its actual contents 
where should I put it.
as described, you need to extend the functionality, this is not supported in 
current version (reason already explained).
For me, to support this you need to extend:

- rowHeight should be rowHeightFor: index
- visibleRows and around need to take first visible row height, then iterate 
one by one asking for the each row size.
- datasource needs to be extended with “rowHeight: index”
Yes.

FTTableContainerMorph is containing what is visible but I wonder why it was 
asking this to the FastTable and to the elements displayed?
explained above: speed needs.

Why the ContainerMorph does not ask the FTTableRowMorph for its height and it 
could be computed based on the font.
I still did not get where the strings built.
I didn’t thought about, that’s why is not calculating font size :)
Also… I cannot know your table will contain text… that’s a task for the 
datasource, then (to answer appropriate row height)… but it needs to be fast! :)

:)



Reply via email to