Hi Dave, I know that feeling well! Having programmed in many environments over the years, I recognise that Squeak has lots of great stuff under the covers, but it takes a lot of work to find your way around at first.
Here's how to load and run the application from scratch:
Start in a Morphic Project (the project you're in when you launch Squeak is actually morphic, so there's no need to open one specially except for tidyness).
Click on the background. This will bring up the World menu. Choose "open..." then "file list", which will bring up a file browser.
Navigate to the file and click on it. You will see that the buttons will change to include a "file in" button. Click that button!
The code is then "filed-in" - you can look at it using the Browser (World menu>open>browser or cmd-B (Mac) / Alt-B (PC)).
To run it, open a Workspace (World menu>open>workspace, cmd-K) and type "SampleImageViewerMorph new" (without the quotes), and press cmd-D/alt-D at the end of the line - the application should then launch.
Press the dir button to select a directory, then press enter in the directory text box, and enjoy the pictures!
I hope this helps.
Michael
ps the other way to load the code is using the Monticello Browser against the squeaksource.com code. This is really useful once you work out how to do it, especially for code that is likely to change. I'm sure I remember seeing an email that explained how to use it in great detail, but here's one from Avi Bryant that gives enough to get started: http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-July/079958.html (change http://www.squeaksource.com/Graphhttp://www.squeaksource.com/Graph%27 to http://www.squeaksource.com/SampleImageViewerhttp://www.squeaksource.com/Graph%27in this case).
On 10/16/06, Another Dave dooright101@yahoo.com wrote:
Thanks for writing some commented SAMPLE CODE for us Squeak newbies. Very NEEDED and appreciated!
I've been at this for about two weeks, and it's a little tough to make the transition between making a car go in circles to writing something useful.
I know enough to open a Morphic project, get your file list, and open it with the zip viewer. This is as close to the "file in" as I can seem to get, as the "load file" command will not show your file. I can load your code from there, but now what do I do with the blank screen? I'm obviously not loading or running it properly.
-- View this message in context: http://www.nabble.com/Some-sample-code-to-help-understand-Morphic-applicatio... Sent from the Squeak - Beginners mailing list archive at Nabble.com.
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners