Anybody have a spreadsheet morph? Not to compete with Excel, more like original Visicalc. Gary Dunn |
Gary,
> Anybody have a spreadsheet morph? Not to compete with Excel, more like original Visicalc. While Skeleton might be too specialized for your needs, it is a nice starting point at least: http://www.languagegame.org:8080/ggame/11 -- Jecel |
In reply to this post by Gary Dunn-2
Hi, I made a *very* simple spreadsheet morph for GSoC last year. It's not nearly as advanced as skeleton but if you're interested you can find it here: http://www.squeaksource.com/GSoCSqueakland/ Cheers, On Oct 7, 2011 8:12 PM, "Gary Dunn" <[hidden email]> wrote:
|
Nice looking work. Clearly your spreadsheet morph can display data in
tabular format, and import/export to csv file. Can a cell be programmed with the common math expressions? C:1 = A:1 * B:1, B:3 = A:3 + 12. Except the left side of the expression is assumed to be the current cell. I tried working with it in Windows 7. Was able to load it and the utils package into Etoys 4.1.1 but how do I get it going? Can you suggest a simple 1-2-3 step process to get me to where I can poke around? (BTW, this is often a stopper for me, I sense it is effortless to experienced Squeakers.) I also tried loading it into a Squeak 4.2 image, but my feeble attempts to get it going were all met with MNUs. Have you tried on Squeak? On Fri, Oct 7, 2011 at 10:17 PM, Ricardo Moran <[hidden email]> wrote: > Hi, I made a *very* simple spreadsheet morph for GSoC last year. It's not > nearly as advanced as skeleton but if you're interested you can find it > here: http://www.squeaksource.com/GSoCSqueakland/ > > Cheers, > Richo > > On Oct 7, 2011 8:12 PM, "Gary Dunn" <[hidden email]> wrote: >> >> Anybody have a spreadsheet morph? Not to compete with Excel, more like >> original Visicalc. >> >> Gary Dunn >> Open Slate Project >> http://openslate.org >> >> > > > > -- Gary Dunn Honolulu |
On Mon, Oct 10, 2011 at 3:32 PM, Gary Dunn <[hidden email]> wrote: Nice looking work. Clearly your spreadsheet morph can display data in No, that's not supported. It shouldn't be difficult to add, though. I always liked that Skeleton allows you to write Smalltalk expressions inside cell functions, that's pretty cool.
You can start by looking at the Object Catalog, take out a "Spreadsheet" and use the halo to open its viewer. You'll find two interesting categories: "data i/o" to import/export from CSV files and "spreadsheet" to deal with the cells/rows/columns stuff.
Or you can try evaluating the following snippet in a workspace: ------------------- spreadsheet := ScrollableSpreadsheetMorph new openInHand. spreadsheet numberOfRows: 20.
spreadsheet numberOfColumns: 10 ------------------- Look at the classes for more info. Basically, there are two morphs: a basic spreadsheet and a scrollable spreadsheet that wraps it with a scroll bar.
I suggest you to use the version I'm attaching. I did a quick test and most of it seems to be working in Squeak 4.2. This version doesn't need any of the GSoC packages, but it needs CSV installed:
(Installer squeaksource project: 'CSV') install: 'CSV'. Feel free to ask me if you have more questions. Cheers, Richo
Spreadsheet-Richo.1.mcz (13K) Download Attachment |
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@2) + (self cellAt: 1@3) would send the #+ message to whatever objects had been dragged into those referenced cells. If I had that, I could finally finish and present a maui-based Office application for Squeak (word-proc, spreadsheet, presentation -- but integrated with standard domain objects as characters, cells, presentations-objects, respectively). I would use Maui's rendering to allow each cell to assume any system or user-defined view. Unfortunately it's way down on my to-do list. I hope someday I'll have time, I think it'd be fun to develop. - Chris On Mon, Oct 10, 2011 at 9:59 PM, Ricardo Moran <[hidden email]> wrote: > > On Mon, Oct 10, 2011 at 3:32 PM, Gary Dunn <[hidden email]> wrote: >> >> Nice looking work. Clearly your spreadsheet morph can display data in >> tabular format, and import/export to csv file. Can a cell be >> programmed with the common math expressions? C:1 = A:1 * B:1, B:3 = >> A:3 + 12. Except the left side of the expression is assumed to be the >> current cell. > > No, that's not supported. It shouldn't be difficult to add, though. I always > liked that Skeleton allows you to write Smalltalk expressions inside cell > functions, that's pretty cool. > >> >> I tried working with it in Windows 7. Was able to load it and the >> utils package into Etoys 4.1.1 but how do I get it going? Can you >> suggest a simple 1-2-3 step process to get me to where I can poke >> around? (BTW, this is often a stopper for me, I sense it is effortless >> to experienced Squeakers.) > > You can start by looking at the Object Catalog, take out a "Spreadsheet" and > use the halo to open its viewer. You'll find two interesting categories: > "data i/o" to import/export from CSV files and "spreadsheet" to deal with > the cells/rows/columns stuff. > Or you can try evaluating the following snippet in a workspace: > ------------------- > spreadsheet := ScrollableSpreadsheetMorph new openInHand. > spreadsheet numberOfRows: 20. > spreadsheet numberOfColumns: 10 > ------------------- > Look at the classes for more info. Basically, there are two morphs: a basic > spreadsheet and a scrollable spreadsheet that wraps it with a scroll bar. > >> >> I also tried loading it into a Squeak 4.2 image, but my feeble >> attempts to get it going were all met with MNUs. Have you tried on >> Squeak? > > I suggest you to use the version I'm attaching. I did a quick test and most > of it seems to be working in Squeak 4.2. This version doesn't need any of > the GSoC packages, but it needs CSV installed: > (Installer squeaksource project: 'CSV') install: 'CSV'. > Feel free to ask me if you have more questions. > Cheers, > Richo > >> >> On Fri, Oct 7, 2011 at 10:17 PM, Ricardo Moran <[hidden email]> >> wrote: >> > Hi, I made a *very* simple spreadsheet morph for GSoC last year. It's >> > not >> > nearly as advanced as skeleton but if you're interested you can find it >> > here: http://www.squeaksource.com/GSoCSqueakland/ >> > >> > Cheers, >> > Richo >> > >> > On Oct 7, 2011 8:12 PM, "Gary Dunn" <[hidden email]> wrote: >> >> >> >> Anybody have a spreadsheet morph? Not to compete with Excel, more like >> >> original Visicalc. >> >> >> >> Gary Dunn >> >> Open Slate Project >> >> http://openslate.org >> >> >> >> >> > >> > >> > >> > >> >> >> >> -- >> Gary Dunn >> Honolulu >> > > > > > |
> 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@2) + (self cellAt: 1@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 |
2011/10/11 Stéphane Rollandin <[hidden email]>:
>> 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@2) + (self cellAt: 1@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. It might be almost trivial for you, but it is not close to trivial for most Squeak programmers, because otherwise this topic would not have gone on as long as it has. Perhaps the solution does not require new code; it might be better documentation, or some worked out examples. But lots of people apparently think that it is hard to make a spreadsheet interface for Squeak, and that is a problem that needs to be fixed. -Ralph |
In reply to this post by Chris Muller-3
On Tue, Oct 11, 2011 at 12:27 AM, Chris Muller <[hidden email]> wrote: I am _really_ interested in a SpreadsheetMorph. Just a grid of Skeleton is pretty much *exactly* what you're describing. If you haven't already, please give it a look: http://languagegame.org:8080/ggame/11. The SqueakMap package works in the latest Etoys image (I haven't tried a Squeak image, though).
It supports formulas as smalltalk expressions just as you're describing (except that it maps cell names as A1, B2, etc.). The cells accept drag and drop of Etoys tiles, which is *extremely* cool, because it lets you link the spreadsheet data with the morphic world.
Cheers, Richo
|
I am amazed to discover that Skeleton works in Squeak 4.2 after just renaming three messages!
I don't think it's really necessary but just to save you a few seconds of your time I attached the change set to apply after loading the .sar file. :)
Cheers, Richo On Tue, Oct 11, 2011 at 8:47 AM, Ricardo Moran <[hidden email]> wrote:
SkeletonForSqueak4.2.1.cs (2K) Download Attachment |
In reply to this post by Ralph Johnson
> But lots of people apparently think that it is hard to make a
> spreadsheet interface for Squeak, and that is a problem that needs to > be fixed. People are never happy with what they've got anyway. Stef |
In reply to this post by Stéphane Rollandin
> This is almost trivial: use a PasteUpMorph with grid layout,
A Table Layout wouldn't work; but what's a "grid layout?" > plus a method > telling which submorph is located at a specific coordinate, and you have it. You make it sound like it's one evening's work, but what I want would take a lot more than that. Besides everything I already said, I want something that looks and feels like a standard spreadsheet, with a cell-cursor, arrow and page movement, resizable columns, etc. I would feel compelled to develop a custom SpreadsheetMorph with its own layout and drawOn: to accomplish this.. > 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. |
Ok, never mind, I was just giving some pointers. Sorry if they are not
useful. Stef |
Your suggestions are spot on. I was thinking there might be a squeak way of doing this lurking just out of sight. Same as I discovered that a thoughtful collection of morphs will do what I thought would require massive programming. 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. I do not think it wise to recreate Excel in smalltalk. Better to have a smalltalk object that does spreadsheet kinds of things in a smalltalk way. Gary Dunn On Oct 11, 2011 9:10 PM, "Stéphane Rollandin" <[hidden email]> wrote: |
On Tue, Oct 11, 2011 at 10:12 PM, Gary Dunn <[hidden email]> 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 Honolulu |
> 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. In my experience of Morphic, I never tried to grok all methods a Morph implements. I explore what methods are used for a given functionality I'm interested into, and ignore the rest. As for PasteUpMorph, one of its functions is to represent the World, so it is indeed very rich. I'm not sure it has to be the basis for a spreadsheet, maybe a simple morph will do. There are a zillion ways to do things in Morphic. In my working image I have 235 living subinstances of PasteUpMorph. No efficiency problem at all. Stef |
Free forum by Nabble | Edit this page |