Honestly not too annoyed, but is there really no way to run snippets of JavaScript in Snap!'s dev mode other than the browser console and maybe the JavaScript function \( @:> \) \{ [] \} block? In most Squeak environments, there is a Workspace you can read files in, and a DoIt option that runs the selected code.
True, I do kinda wish Morphic had more fun stuff like Squeak because I really do enjoy the idea
You can run snippets of Snap! code in Snap!, which is what we’re all about!
C’mon, every Smalltalker knows that everything inside the environment is a “Workspace”, and can run code:
In Morphic.js I didn’t implement a class hierarchy browser, because JS isn’t class based. But I did, of course, start with inspectors. You can run JavaScript in the right-bottom pane, just like you can do in Smalltalk. Also, just like in Smalltalk, “this” (“self” in Smalltalk) refers to the current object you’re inspecting.
Since JavaScript doesn’t have the notion of an “image”, it doesn’t make much sense to actually develop apps that way, neither in that tiny pane nor using Morphic’s interactive visual composition tools. I made it before there were these tools in browsers so I could use them to debug my Morphic applications (mainly Snap!, but there were / are a few others) better. Because when you’re developing a GUI your classical “tests” don’t help much. You need to be able to drill down and look at what’s actually there in the real, live system, not just what traces it left in some log.
Now we have wonderful tools directly in the browser, but since all of Snap is running inside a single Morphic World correlating to a single HTML Canvas element I’m still using the Morphic inspecting widgets that way, because, of course, browsers can’t offer that.
huh, guess i didnt really think about that. i guess i can’t blame myself, i havent used Squeak or Smalltalk recently (or ever, for that matter). i suppose i just expected that only that particular morph to have that context menu option.
Side note, some versions of Squeak (particularly etoys) have “halo handles” around morphs when you middle-click - little buttons that do handy actions like inspecting, resizing, etc.:
snap! doesn’t have these, though i suppose you can do all that stuff in the
context menu anway.
those colorful halos never did convince me. I liked the look of the older versions of Smalltalk better. The best thing about Squeak was Morphic, ha!
Partially unrelated, but Morphic.js made me obsessed with the HTML canvas and what you can do with it for a good few months, to where I even started to make my own canvas UI library. Never finished it, though I got really far. A recreation of this library and a paint app demonstration with it was actually my AP CSP project, lol
Ooh, may I see?
May I see?
Which? The library or the CSP project? One (the project) is much easier to find than the other
both, if that’s possible
I’ve been having fun with squeak for a bit, and gosh I actually do love Smalltalk:
Using this makes me realize how much of morphic.js’ code is based on Squeak. i see the aType pattern EVERYWHERE, and now this makes me realize why. I like the message passing system and how that its so simple yet can do so much. I like how booleans work, remind me of Church Booleans, where false is
and true is ![]()
And also, here are what the controls morphs actually look like:



