[squeak-dev] Spreadsheet morph

Stéphane Rollandin lecteur at zogotounga.net
Tue Oct 11 08:02:42 UTC 2011


> I am _really_ interested in a SpreadsheetMorph.  Just a grid of
> objects.  Drag and drop.  "Formulas" would just be Smalltalk
> expression strings sent to the SpreadsheetMorph itself, which can
> reference any of its cells, of course:
>
>      (self cellAt: 1 at 2) + (self cellAt: 1 at 3)
>
> would send the #+ message to whatever objects had been dragged into
> those referenced cells.

This is almost trivial: use a PasteUpMorph with grid layout, plus a 
method telling which submorph is located at a specific coordinate, and 
you have it. The drag and drop stuff can be implemented by populating 
the spreadsheet with initial empty cell which, upon a drop event, 
becomeForward: the dropped morph (possibly resizing it); I have done 
this in muO's musical graph system.


Stef



More information about the Squeak-dev mailing list