Every time I look at smalltalk, I'm blown away with how cool it is to work with and each time I try to get started, my efforts are stymied pretty quickly. I understand message passing, and I understand the basics of the syntax, but I'm having a very hard time understanding how to use the class libraries. I am trying to build a very small app. A simple data editor and browser. I've been able to follow an example in the code (simple grid example). I can now display my objects in a window, with four of the attributes listed in the editor. Now I can select an time and change it in place in the list editor but that change doesn't make it into the "database" (my ordered collection). It is not clear to me at all how to select a line in a MorphTreeMorph. Nor how to save the change when the user tabs out or hits return. Any help would be appreciated. Tony MovieEditor.tiff (1M) Download Attachment |
Is your code available somewhere on SqueakSource ?
Laurent.
On Fri, Jun 17, 2011 at 5:26 AM, Tony Giaccone <[hidden email]> wrote:
|
In reply to this post by Tony Giaccone-2
I understand your frustration.
It is mine too. This is why we are working steadily on fixing libraries. Indeed we are missing simple and powerful widgets like grids. Have a look at UITheme examples. Stef On Jun 17, 2011, at 5:26 AM, Tony Giaccone wrote: > > > Every time I look at smalltalk, I'm blown away with how cool it is to work with and each time I try to get started, my efforts are stymied pretty quickly. > > I understand message passing, and I understand the basics of the syntax, but I'm having a very hard time understanding how to use the class libraries. > > I am trying to build a very small app. A simple data editor and browser. I've been able to follow an example in the code (simple grid example). > > > I can now display my objects in a window, with four of the attributes listed in the editor. > > > > <MovieEditor.tiff> > > Now I can select an time and change it in place in the list editor but that change doesn't make it into the "database" (my ordered collection). > > It is not clear to me at all how to select a line in a MorphTreeMorph. Nor how to save the change when the user tabs out or hits return. > > > Any help would be appreciated. > > > > Tony > > |
I have what is quite acceptable as a grid using the SimpleGridExample.
I also have figured out that the way to find the selection is by asking the model, not the tree. I have spent the last two days working on building a model in small talk of the problem domain. WHen I'm writing brand new code, I feel like I'm reasonably productive. It's when I have to try and start figuring out how to interact with the class libraries that my productivity plummets. The problem is to understand the libraries you have to be able to read the code, because there is no documentation. But reading the code in Smalltalk mean you have to know the language, the idioms in the language and how to successfully use the tools. That's a lot of learning curve. I have a reasonable first pass of the model working well now. Not complete, but good enough to be able to start looking at how to implement the UI. The problem for me is finding the code examples to look at. I spent a fair amount of time searching through squeaksource. I've been spending hours looking over the few examples in Morphic-MorphTreeWidget-Examples I'm more than wiling to try and expand the pool of examples as I start to flesh out what I'm doing. The pharopod casts have been extremely helpful. Tony On Jun 18, 2011, at 2:49 AM, Stéphane Ducasse wrote: > I understand your frustration. > It is mine too. This is why we are working steadily on fixing libraries. > Indeed we are missing simple and powerful widgets like grids. > Have a look at UITheme examples. > > Stef > > > On Jun 17, 2011, at 5:26 AM, Tony Giaccone wrote: > >> >> >> Every time I look at smalltalk, I'm blown away with how cool it is to work with and each time I try to get started, my efforts are stymied pretty quickly. >> >> I understand message passing, and I understand the basics of the syntax, but I'm having a very hard time understanding how to use the class libraries. >> >> I am trying to build a very small app. A simple data editor and browser. I've been able to follow an example in the code (simple grid example). >> >> >> I can now display my objects in a window, with four of the attributes listed in the editor. >> >> >> >> <MovieEditor.tiff> >> >> Now I can select an time and change it in place in the list editor but that change doesn't make it into the "database" (my ordered collection). >> >> It is not clear to me at all how to select a line in a MorphTreeMorph. Nor how to save the change when the user tabs out or hits return. >> >> >> Any help would be appreciated. >> >> >> >> Tony >> >> > > |
On Jun 18, 2011, at 4:04 PM, Tony Giaccone wrote: > I have what is quite acceptable as a grid using the SimpleGridExample. > > > I also have figured out that the way to find the selection is by asking the model, not the tree. > > I have spent the last two days working on building a model in small talk of the problem domain. WHen I'm writing brand new code, I feel like I'm reasonably productive. It's when I have to try and start figuring out how to interact with the class libraries that my productivity plummets. The problem is to understand the libraries you have to be able to read the code, because there is no documentation. But reading the code in Smalltalk mean you have to know the language, the idioms in the language and how to successfully use the tools. That's a lot of learning curve. I totally agree. The problem is that few people spend the time to document and write tutorials. We will try with ben to write a chpater on basic widgets. Stef > > > > I have a reasonable first pass of the model working well now. Not complete, but good enough to be able to start looking at how to implement the UI. > > The problem for me is finding the code examples to look at. I spent a fair amount of time searching through squeaksource. > > I've been spending hours looking over the few examples in Morphic-MorphTreeWidget-Examples > > I'm more than wiling to try and expand the pool of examples as I start to flesh out what I'm doing. > > The pharopod casts have been extremely helpful. > > Tony > > On Jun 18, 2011, at 2:49 AM, Stéphane Ducasse wrote: > >> I understand your frustration. >> It is mine too. This is why we are working steadily on fixing libraries. >> Indeed we are missing simple and powerful widgets like grids. >> Have a look at UITheme examples. >> >> Stef >> >> >> On Jun 17, 2011, at 5:26 AM, Tony Giaccone wrote: >> >>> >>> >>> Every time I look at smalltalk, I'm blown away with how cool it is to work with and each time I try to get started, my efforts are stymied pretty quickly. >>> >>> I understand message passing, and I understand the basics of the syntax, but I'm having a very hard time understanding how to use the class libraries. >>> >>> I am trying to build a very small app. A simple data editor and browser. I've been able to follow an example in the code (simple grid example). >>> >>> >>> I can now display my objects in a window, with four of the attributes listed in the editor. >>> >>> >>> >>> <MovieEditor.tiff> >>> >>> Now I can select an time and change it in place in the list editor but that change doesn't make it into the "database" (my ordered collection). >>> >>> It is not clear to me at all how to select a line in a MorphTreeMorph. Nor how to save the change when the user tabs out or hits return. >>> >>> >>> Any help would be appreciated. >>> >>> >>> >>> Tony >>> >>> >> >> > > |
In reply to this post by Tony Giaccone-2
"that the way to find the selection is by asking the model, not the tree"
- is this really what you mean ? If so, I will try to get to work on documenting this as most Smalltalkers from non-Morphic might also not find that obvious. Which objects need to know "selection" should be based on the behavior/services they publish as their messaging protocol. Smalltalk oor not. Or not? I am looking at a new grid/worksheet implementation on sourceforge.net for an OOP language with Traits used in Japan with observer pattern. Without their demo code + docs, there too a new programmer would spend days trying to see what was intended for use in practice in real-world app's and with good performance for large data sets. Even in the corporate world of Java on the web app server, there are third-party vendors of grid wdgets licensing their source for sale $$$ - how many years after Visicalc ? And often in JavaScript frameworks or libraries or mix of both. Veyr impertant: document your own sucesses !!! because in 12 months you could be back scratchig your head about what you achieved and why you did it one way and not another .. COBOL was supposed to be self-documenting - and proved a maintenance nightmare (huge backlogs of simple change requests at banks, insurers.) After years maintaining and adapting legacy Smalltalk of 3 dialects n large USA corp's I believe: 1) Smalltalkers really believe that short methods are self-documenting 2) that the debugger reveals INTENT 3) that tests may now be first, but docs still remain last 4) managers know to ask for all tests to run + test coverage data - but do not try to read the docs let alone ask an outsider to form an opinion of whether the docs capture the intent I.E. dos are still not peer-reviewed. As Turing warned Wittgenstein - we don't want bridges that collapse in an applied science. Bridges are now far more reliable and sophisticated than most business software - yet the "grid" or worksheet or spreadsheet is core to a great deal of business software as is the bridge to the infrastructure of logistics in national economies - even some "islands" ! a tree alongside a grid was in Visual Smalltalk Enterprise back in ??? a tree is not quite there yet for Google Mail for the ChromeBook ;-) R Alan Turing: Yes, but some bridges may collapse. On whether patterns and practices trump formal theory Cambridge U On 18 June 2011 11:04, Tony Giaccone <[hidden email]> wrote: > I have what is quite acceptable as a grid using the SimpleGridExample. > > > I also have figured out that the way to find the selection is by asking the model, not the tree. > > I have spent the last two days working on building a model in small talk of the problem domain. WHen I'm writing brand new code, I feel like I'm reasonably productive. It's when I have to try and start figuring out how to interact with the class libraries that my productivity plummets. The problem is to understand the libraries you have to be able to read the code, because there is no documentation. But reading the code in Smalltalk mean you have to know the language, the idioms in the language and how to successfully use the tools. That's a lot of learning curve. > > > > I have a reasonable first pass of the model working well now. Not complete, but good enough to be able to start looking at how to implement the UI. > > The problem for me is finding the code examples to look at. I spent a fair amount of time searching through squeaksource. > > I've been spending hours looking over the few examples in Morphic-MorphTreeWidget-Examples > > I'm more than wiling to try and expand the pool of examples as I start to flesh out what I'm doing. > > The pharopod casts have been extremely helpful. > > Tony > > On Jun 18, 2011, at 2:49 AM, Stéphane Ducasse wrote: > >> I understand your frustration. >> It is mine too. This is why we are working steadily on fixing libraries. >> Indeed we are missing simple and powerful widgets like grids. >> Have a look at UITheme examples. >> >> Stef >> >> >> On Jun 17, 2011, at 5:26 AM, Tony Giaccone wrote: >> >>> >>> >>> Every time I look at smalltalk, I'm blown away with how cool it is to work with and each time I try to get started, my efforts are stymied pretty quickly. >>> >>> I understand message passing, and I understand the basics of the syntax, but I'm having a very hard time understanding how to use the class libraries. >>> >>> I am trying to build a very small app. A simple data editor and browser. I've been able to follow an example in the code (simple grid example). >>> >>> >>> I can now display my objects in a window, with four of the attributes listed in the editor. >>> >>> >>> >>> <MovieEditor.tiff> >>> >>> Now I can select an time and change it in place in the list editor but that change doesn't make it into the "database" (my ordered collection). >>> >>> It is not clear to me at all how to select a line in a MorphTreeMorph. Nor how to save the change when the user tabs out or hits return. >>> >>> >>> Any help would be appreciated. >>> >>> >>> >>> Tony >>> >>> >> >> > > > |
Free forum by Nabble | Edit this page |