[squeak-dev] Spreadsheet morph

Gary Dunn garydunnhi at gmail.com
Fri Oct 14 00:12:23 UTC 2011

On Tue, Oct 11, 2011 at 10:12 PM, Gary Dunn <garydunnhi at gmail.com> wrote:
> Last weekend I played with table layout in a text morph, trying to
> understand what all those options do ... alignment, spacing, etc. I did not
> get very far. Next time I will try a PasteUpMorph and hopefully I'll get
> father.

Yesterday I had a little time to play around with PasteUpMorphs. More
than likely I am missing a lot. I want to run this by you to see if I
am on the right track.

Stéphane Rollandin suggested grid layout. The grid is an object
alignment tool with snap-to behavior, like those found in a typical
vector drawing program. I cannot find a grid layout mode; choices are
none, proportional, and table.

A PasteUpMorph in table layout mode can group morphs into a row OR a
column, but not both at the same time. To me, a table has rows and
columns, but I cannot find any way to start a second row or column.

I can get close to what I think of as a table by using two levels of
PasteUpMorphs, one as the master holder set in row mode ("top to
bottom"), and inside that one a set of PasteUpMorphs in column mode
(left to right). I created simple, static cells using text morphs
dropped into the rows. If I use a PasteUpMorph for each cell I get
close to a spreadsheet's visible grid lines, but see below.

Seems to me that a PasteUpMorph is a very large object, with a ton of
instance variables that mostly go unused in this case. Should I be
looking for a more efficient approach? As for my own brain, the large
number of methods is overwhelming.

Hope to play with Skeleton soon.

Gary Dunn

More information about the Squeak-dev mailing list