Squeak newbie questions
simon.bates at hushmail.com
simon.bates at hushmail.com
Thu Mar 8 23:58:25 UTC 2001
Dear all,
I have been experimenting with Squeak on and off for a while now and I have
enjoyed
my experience with it very much. I would now like to begin using it more
extensively
and I would also very much like to contribute to the project if I am able.
I thought that it
might help to share some of my thoughts on beginning to use Squeak and I
hoped that
you might help me with some questions that I have. I have been unable to
find answers to
the questions in the documentation that I could find, however, if they are
answered
elsewhere I apologise.
I am most familiar with working in a UNIX environment so that is colouring
my relation
to Squeak. While I feel like I have a grasp of the Smalltalk programming
language and
programming environment I think that I am not really grasping some of how
to use
Squeak as a user environment, particularly the image. By "user environment"
I mean the
environment I use to perform tasks using a computer, such as writing documentation,
browsing the web, reading and writing email, drawing pictures, etc. At the
level of
program usage and program interaction I am used to thinking in terms of
data files and
programs that operate on data files. Before discovering Smalltalk I had
done object
oriented programming in Java and C++. However, when using these languages
I still built
programs that operated on data files. I am not used to working in a system
which is object
oriented on all scales.
I thought that the above might help to give some context to my questions.
1. How should I distribute data between inside the image and on the host
filing system?
For example, if I want to write a photo album browser Morph for viewing
my digital
photos in Squeak. Do I store the photos primarily on the host filing system
or do I file
them all into my Squeak image? Filing all the photos in will make the image
very large
but is this normal and should I rely on virtual memory to swap data between
RAM and
the hard disk?
2. How should I organize instances of objects within the image?
I understand that I can have variables local to a Workspace and that instances
of Morphs
are accessible through their GUI but how do I access an instance of an object
across
multiple Workspaces or Projects? For example if I want to store notes that
I am taking as
I work with Squeak in UNIX I might do
$ vi ~/notebook
and if I want to search the file for a note that I took on creating Morphs
I might do
$ grep 'Morph' ~/notebook
I thought about creating a global (in the Smalltalk SystemDictionary) Dictionary
called
#Home and storing references to them there
Home _ Dictionary new.
Home at: #notebook put: Workspace new.
The Squeak equivalents to the above UNIX commands that I came up with are
"vi ~/notebook"
(Home at: #notebook) openLabel: 'notebook'.
"cat ~/notebook"
((Home at: #notebook) contents string) linesDo: [:line | Transcript show:
line ; cr].
"grep Morph ~/notebook"
((Home at: #notebook) contents string)
linesDo: [:line | ('*Morph*' match: line) ifTrue: [Transcript show: line
; cr]].
All I have done with the above is to transfer a UNIX way of working into
Squeak so I
was wondering what would be a more Smalltalk approach to the above tasks?
If there is no document existing that addresses these issues I would be
very happy to
volunteer to start one. I could write my experiences up as "An introduction
to Squeak for
UNIX users" or something similar that could outline how common practices
in UNIX
translate into the Squeak environment.
Thank you very much for your time,
Simon.
Free, encrypted, secure Web-based email at www.hushmail.com
More information about the Squeak-dev
mailing list
|