[Newbies] Some sample code to help understand Morphic applications

Matthew Fulmer tapplek at gmail.com
Tue Oct 17 05:48:54 UTC 2006


On Mon, Oct 16, 2006 at 01:49:20PM +0100, Michael Davies wrote:
>    Hello all,
> 
>    I've been interested to read about some of the activities of the
>    Documentation team, as I've recently been trying to work out how to build
>    a GUI application in Squeak.
> 
>    To that end, I've built a sample image viewer application, heavily
>    annotated, to keep a record of my understanding of the following areas:
>    - Morphic layout
>    - Use of Models and Pluggable Morphs
>    - Interacting with the filesystem
>    - Launching and managing background processes

Cool. That heavily commented SampleImageViewerMorph>>initialize is
especially useful

>    The code is attached, and can also be found at
>    http://www.squeaksource.com/SampleImageViewer.html
> 
>    I'd appreciate it if anyone could spare some time to have a look at this
>    sample and see if I'm making any obvious mistakes (especially my
>    termination of processes, which I suspect isn't very robust), or if the
>    'squeakiness' of the code could be improved.

I am not sure, but every time I hit enter in the dir box, or
click the main panel, I get a debug window. What Squeak version
is this made for? I am using 3.8. A quick question: is the
correct way to run this program:
SampleImageViewerMorph new openInWorld

>    If anyone from the Documentation team is building a repository of sample
>    code for beginners, I'd be happy to incorporate this application into such
>    a repository.

We have not considered a code repository, but this morph is
quite simple, and may be useful in a tutorial. I might
incorporate it into my beginner's tutorial:
http://minnow.cc.gatech.edu/squeak/5869

-- 
Matthew Fulmer


More information about the Beginners mailing list