s LearnSqueak.com

04 / PROJECT SOURCE WALKTHROUGH · SQUEAK 6.0

Compose live objects.
Let them respond.

Look inside the project’s fourth studio: native content wrapped in selectable objects, ownership changes on drop, TableLayout, and animation through step messages.

3 executed examplesNative PNGs · copyable source

MORPHIC PLAYGROUNDNATIVE SQUEAK WINDOW
A real window rendered by Squeak. Click to inspect the full-size capture.

FOLLOW THE OBJECTS

  1. 01Controller
  2. 02Item wrapper
  3. 03Native contents
  4. 04Owner + layout

MorphicShowcase owns the selection and controls. MorphicDemoItem wraps native contents and handles dragging, sizing, naming, and animation. MorphicDemoStage draws the grid; a second Morph owns dropped items. A TableLayout arranges existing chips. The controller inherits editor/theme helpers from PenPlayground, while this interface presents native widgets rather than a drawing-code editor.

READ → RUN → INSPECT → CHANGE

Inside the implementation.

Evaluate a complete Workspace recipe, then switch to Project methods to read the code it uses. These classes belong to this project; install the source suite first.

DESIGN CHOICES IN THIS PROJECT

Ownership is part of the interface

An item’s owner determines where it lives in the Morph tree. Reparenting moves its native contents along with the wrapper. The drop handler reuses the same object, converts its position to local grid coordinates, and clamps it to the new owner’s usable rectangle.

Layouts and stepping are separate

TableLayout arranges the chip Morphs when its list direction changes. The selected draggable item moves through step and stepTime. A different owner gives that item different available bounds. Squeak handles the live scheduling; the recording runner supplies native steps explicitly.

The Inspect action exposes the selected object. Native halos give access to Morphic editing tools, while the Browser action lets you read or change the wrapper class. Changes affect live objects in the same image.

RUN THE SAME STUDIOS

Open the project in Squeak.

Use the existing Pen Studio image, or install the downloadable custom classes into Squeak 6.0. The bundle contains Smalltalk source and setup notes; it does not contain a saved image.

02 / Launch and inspect

Open a Workspace, select PenDemoLauncher run., and choose Do it. Each launcher action returns a native window in the same image. Alternatively open this studio directly with MorphicShowcase run.

The lesson recipes return a SystemWindow. Choose Inspect it, then inspect its model to follow the fields named in each example. Method listings belong in the System Browser; use the Workspace tab for a complete runnable expression.

03 / Browse and experiment

Find the class in the System Browser. Choose instance or class side as indicated above each method. Modify a message, accept the method, and rerun the example. These are live Smalltalk objects: you can inspect the scene, commands, Forms, and owner tree directly.

SOURCE AND RECORDING EVIDENCE

Recorded from the actual project.

The native runner files in the ten source files, compares every documented method with installed source, evaluates the exact Workspace recipes, and checks their resulting state. It stops automatic stepping before supplying the recording messages shown next to each GIF.

The PNGs are complete native window captures. GIFs use a shared reduced-color palette and repeat excerpts, so a loop boundary can jump. The website displays recordings; the live studios run inside Squeak. The runner closes its windows and exits without saving the image.

Return to the project guides →

Download original ↓