Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
This is a list of questions about Squeak. There is also a much bigger Squeak FAQ at http://minnow.cc.gatech.edu/squeak/471.
Q: How do I use Squeak on the Lab Machines?
Good question. To get started, the Windows machines have squeak in S:\Apps\Squeak and the Unix machines have a VM in /usr/local/public/bin. More info is at Running Squeak
Q: Where do I get Squeak for my Computer?
2.7 and 2.8 are on the CD in The Text Book. To download the most recent version of Squeak, go to http://squeak.org/download/ and scroll down to the table which has links to various distributions depending on your os.
Q: Where's the Squeak API Documentation?
There isn't a separate, full documentation of the system. That's a good thing for this class: the code is documentation, too, and you must learn to use it. Squeak has tons of tools to help you with this–become familiar with them early, so that you will be ready when the harder milestones come along!
Become familliar with the method finder, and the variety of buttons in the browser: senders, implementors, hierarchy can be especially helpful. And learn some search strategies: many classes have comments, and many classes have "example" methods that show you how to use them. All classes can be visited via "class refs" to see code that is using it. And many other techniques...
Some central parts of the system are documented separately. Here are some starting points for you:
Also, see How Do I?.
Q: Is anyone using Squeak commercially?
Yes. They like that it is free, open source all the way down, and Smalltalk. Some examples:
- Disney is developing video games in Squeak (see Disney Blast and the 20,000 Leagues under the Sea videogame at Disneyland)
- Advantive is now hosting Swikis at http://www.swiki.net
- Stono Technologies is building a new stadium broadcast system in Squeak.
- Others (IBM, Interval Research) are using it in-house for prototyping and development
- TFEI (The Fourth Estate Inc.) in San Diego
- Phaidros Software AG in Germany
- For a more detailed list, see the Production Squeak page on the minnow Swiki at http://minnow.cc.gatech.edu/squeak/556.
Q: What about other Smalltalks?
Other Smalltalk get more use commercially. See:
Q: Whenever I save a method the comments disappear. What's going on?
A: You have probably started Squeak without a writable changes file. It is practically impossible to recover comments in the methods you have already written. In the future, pay attention to the initial warning Squeak gives you when the changes file is unwritable.
The most common problem is that the changes file isread-only. For example, you might try to run Squeak directly from a CD-ROM or from a read-only network drive. Also, if you copy a file directly from a CD-ROM, then sometimes the copied changes file will end up read-only. Another possibility is that the file is named incorrectly – the changes file should have the extension ".changes", and not ".cha" or anything else. Some versions of Microsoft Windows will mislead you if you use the graphical tools; you can use "dir" in a DOS prompt to get an accurate listing in this case.
Q: When my group members file in my file-outs, the code is all on one line, or it has other line-ending problems. What can we do?
Different operating systems handle newlines differently. Squeak expects carriage returns as the line terminator, which is the convention on Macintoshes but not on Unix or MS Windows. Various software no non-Macintosh platforms has a tendency to "helpfully" convert the line endings to the local format for you.
One solution is for everyone in the group to use CrLfFileStream.
Barring that, here are several possibilities to avoid software converting the line endings in your files.
Using e-mail/ftp to transfer .st files:
ZIP the .st file(s) prior to sending them over the internet. E-mail clients/servers will sometimes transfer the attachments as plaintext, resulting in a stripping of the DOS-based newlines required for Squeak. If you decide to transfer the file to an FTP server, DO NOT USE ASCII MODE. You MUST use BINARY mode to keep the structure of the file completely intact.
Using a web server to transfer .st files:
The file must be saved with proper newlines and placed on the webserver with these newlines intact. When a web client downloads these files, it needs to "SAVE TARGET AS" or some comparable method. If you open the file, it will download it as a MIME text/plain...the browser sometimes inserts its own newlines in place of the Squeak ones upon a "SAVE" or "SAVE AS". This could result in stripping the DOS-based newlines on some nix-based machines.
Using AIM/ICQ to transfer .st files:
The transfer is known to work between Windows AIM/ICQ clients only. They employ a binary transfer method that is similar to BINARY mode in FTP. Transfer amongst different operating systems may result in random behavior, so don't try it unless you KNOW it works.
Q: I accidentally ran Squeak in a read-only directory. How can I fileOut?
A: You can run a fileout with Smalltalk code in a workspace. For example:
| catName dirName |
catName := 'My-Category'.
dirName := 'Z:\'.
on: (FileStream newFileNamed: dirName, catName, '.st').
Q: How do I read BookMorphs?
How to Read BookMorphs
Q: How do I change the colors or standard fonts in Squeak?
Choose Appearance... from the World menu and System Windows. Set each window's default colors.
Q: I can't read the BookMorphs well on Linux (1/20/2000)
It's now verified as a bug (See Bert on Linux Bookmorphs). We're working on a fix.
Q: Is there a way to get a handle to an object on the screen? For example, how can I get a handle to one of those "Play With Me" windows that are there when you open Squeak?
If you want a handle to a morph, and you are in a morphic project, you can use the halos. Look for "inspect morph" on the "debug" halo (the gray one). The top-level project is MVC, so this won't work.
To get a list of everything in Morphic type: "World" in a Workspace and Inspect it. This will give you a list of everything in the project. Look in the submorphs category for a list of the open windows (Morphs) in the project.
Also, you can set things up so that when you drop a morph in a workspace, a handle will be created for it in that workspace. You must use the menu at the top left of a system window (right next to the X close button), and turn on "create textual reference to dropped morphs".
If you want to go the other way around, and find all objects that belong to a class, you can use allInstances. For example in the main Sqeak desktop open a workspace and type: "Project allInstances" then inspect it (Alt-i). This will give you a list of all Projects including the Play With Me's.
Q: How do I create standalone apps in Squeak?
Get info from these locations:
- Section 2.6 (page 58-59).
- Lex Spoon on apps in Squeak
- The main Squeak FAQ: http://minnow.cc.gatech.edu/squeak/471
Q: Who owns Squeak?
A: No one, really, in any normal sense. Legally, lots of people. Squeak is built from the contributions of MANY people, and normally they do not give up their copyright when they contribute.
Roughly speaking, do what you want with it. The main requirement is that if you change anything in the base system, you have to publish your changes publically so that other people can share. If you simply write an application in Squeak, then you can hide the source code if you prefer.
For more detail, follow links from here:
Q: Squeak crashed I've lost a lot of changes! What can I do?
A: In the future, save and file-out more often. For now, don't panic! All of your changes are in the .changes file, and you merely have a lot of work ahead of you. Options:
- If your image crashed but reloads successfully, then use "changes->recently logged changes..." to browse all changes you have recently made. (Note, this is different from "browse->recent submissions", which doesn't check the changes file).
- Otherwise, copy the last 100k or so of your changes file to a new file, and do "browse changes" on the new file from a FileList. Be sure not to chop a change in half when you extract the 100k.
- At worst, you can always edit the changes file in a text editor and cut-and-paste your changes into a new Squeak image.
Q: Why, when I add a menu to a PluggableListMorph, do I get doesNotUnderstand: messages?
Look closely in the debugger, and you will see that the message that isn't understood is probably perform:orSendTo:. If this is the case, then implement a perform:orSendTo: method on your class that looks like this:
perform: selector orSendTo: anotherTarget
(self respondsTo: selector)
ifTrue: [ ^self perform: selector ]
ifFalse: [ ^anotherTarget perform: selector ]
Why is Squeak named so?
By Alan Kay:
It was the Mac folder name in early 96 that I used to hold the new system files and keep it separate from some of the other Smalltalks that were on my machine. We were being wooed by Disney at that point and I thought that whatever happened there would be some kind of mouse in the future of this system. A month or so later the question of a name for the system came up in a group meeting and I said that I had been using the name "Squeak". Everybody liked it, and that was that.
Add more Q's:
Could you elaborate on how we use squeak on the lab machines?
|What are you having trouble with? What doesn't work when you try it on the lab machines? Mark Guzdial |
what are all of the data structures available in squeak and could you give a description of each and how they are used?
Links to this Page