A Snap! Mod Idea (Part 3)

I've started.

It currently looks like this:


Which means I made the script editor in the right place and the right size. I'll leave it as it is until tomorrow.

Sprite's give some form of modularity. Now all your scripts must fit into a single scripts area.

... that's theoretically infinite in extent. I should probably make a way to go to a particular spot on the script editor.

Where's the code that tells the stage to be a StageMorph? It isn't in gui.js.

IDE_Morph.prototype.createStage@gui.js

IDE_Morph.prototype.createStage = function () {
    if (this.stage) {
        this.stage.destroy();
    }
    this.add(this.scene.stage);
    this.stage = this.scene.stage;
};

Nowhere in that is new StageMorph.

For v7 Scene.js

function Scene(aStageMorph) {
    this.name = '';
    this.notes = '';
    this.globalVariables = aStageMorph ?
        aStageMorph.globalVariables() : new VariableFrame();
    this.stage = aStageMorph || new StageMorph(this.globalVariables);

Thanks! I'll edit that to make it a TextMorph in a FrameMorph in a ScrollFrameMorph if I can.

But why? Stage is already a FrameMorph with additional functions to handle global objects (variables, custom blocks). So there is less unnecessary code to remove from Stage than to add to plain FrameMorph.

Oh. But StageMorph doesn't have a ScrollFrameMorph parent, and doesn't have a TextMorph child. I'll have to add those.

I'm not sure that really answers the point. We have in effect a hierarchical system for scripts, but with ony one step; you choose the sprite you want, then you look around for the script. You should probably invent a module system to replace sprites in which there are buttons somewhere to select a module. (But maybe they should still all be able to call each other.)

I think I can use modified v7 scenes for that.

Like how, (I think) if you've imported a.js and b.js in HTML, a.js can use things in b.js, and vice versa?

273 / 273

I see 75/75. + whatever in part 2 (101, can't forget the 101st one by the system saying it was closed) + whatever in part 1 (101) = 75 + 101 + 101 = 277.

Yes, like that. If you think about sprites as modules, in Snap! the default behavior when you make a block is that it's global (available to all sprites/modules). But you can choose to make a sprite-local block, available only to that sprite (and its clones).

Scenes are a taller barrier than sprites. When one scene is visible, only its sprites, its blocks, its variables, everything, are available. I'm not sure Jens has finished the design, but right now there's no way to build a scene-global (available in all scenes) block.

... and variables. It's likely going to happen. (why did I write "gappen"?)

Because you'd just finished writing "going" and that finger was itching to fire again.

qwertyuiop
asdfghjkl
zxcvbnm
most likely.

Currently it doesn't work. I'll revert to a previous version, if I can figure out how to.

Edit: The online github.com doesn't seem to have revert functionality.

Edit 2: Finally got it reverted!

Edit 3: Reverted rings being in the operators category first revert second revert. Sorry Brian.

Edit 4: I made a pull request here, but:


How do I do that on the web gui?




Anouncement


I am no longer maintaining this mod. Control has passed to @joecooldoo here.