It's kinda nice to have a working debugger:
Stacksmith
HyperCard successor https://stacksmith.org
Implemented lots of manipulation of chunks: In addition to querying properties of chunks, you can set them. We also now have put before/after for prefixing text with other text or appending. That works on entire variables, chunks of variables, globals and objects (like text fields and buttons).
Implemented lockMessages today. Mostly for the use of the debugger to pause messages while it is up, but decided to also expose it to scripts while I'm at it. To test it, I also did a quick’n dirty implementation of the wait command.
Not much time to code the last few weeks, but managed to sneak in work on setting properties on ranges of objects, e.g. for setting text styles.
Happy Birthday, Stacksmith! It's April 1st, and you started as an April Fool's joke.
I sure fooled myself … 😅
Making lots of small fixes to bring syntax in line with SuperCard’s, including making the background determine the size of a card inside the window. But don’t worry, we’ll have the autoBackSize property too, to make the window resize the background, if you want that.
Somehow it took me until now to implement text styles in fields again.
Luckily, I had code from the previous version of Stacksmith lying around for encoding/decoding text styles. Unfortunately, that wasn’t quite bug-free and using it in a different way in the new Stacksmith exposed those issues.
Next up: Restoring access from HyperTalk to these styles, by exposing textStyle properties on chunks etc.
Successful programming stream today. Stacksmith now has a (very primitive) script editor. It doesn’t auto-indent or anything yet, it's just a text field. In the process we also fixed a few bugs, and found one big bug I'll have to think hard to find a fix for.
Implemented 'ask’ and 'ask file' commands. Again, the names are kinda confusing, but that's what HyperCard had and they get the job done until I come up with something better that doesn’t collide with existing commands.
Means we can finally create a GUI for creating new stacks in Stacksmith, instead of having to use the Message Box window.
Started work on a Project Browser window. Right now it just displays the hierarchy of all open projects (and very slowly due to a missing feature). The idea is that, in time, it will let you bring clicked objects up in the inspector, and change their attributes, and also will let you re-order, bulk-edit etc. objects, or drag in media.
But not tonight 😅
You can now paste images into Stacksmith while you're using the pointer tool and they will be added as icons to the project, and a new vector graphic of style "picture" with that as its icon will be created for you.
I'm not sure if I'll keep this (having to delete a picture separately from its placement on the card is a bit un-intuitive, a graphic should *be* its image), but if I don’t, I'll use the same internal mechanism for storing icons, so it'll be a quick change over.
Implemented the “answer file” command and started working on fixing a bug opening projects, so that the "open" menu item will work again, now that more of it is implemented in scripts, and not compiled code.
And yes, I’m strongly considering renaming ‘answer file’ to something more self-explanatory, but this is the name it had in HyperCard, so it's a starting point.
I just found the source code and built executables for an early predecessor of Stacksmith:
This Sunday's stream Stacksmith gained some more simple button styles, to allow for non-rectangular hit targets. You can customize the colors, too, even make them transparent.
Did a lot of work on the “do” command, which is used for the message box window. The message box can now automatically extract the result of the commands written into it and of the variable “it”.
This, for example, allows us to show the result from an “answer file" command in the message box after the command has run.
I also fixed the issue I had with opening projects, so we can now again create new projects and open them, not just the “home” stack that implements the editing interface.
There are things that seem really complicated, and end up being really easy to implement (like importing a dozen different image file types, or auto-resizing controls inside a window).
And there are things that take a lot of work, like making sure that when you resize a window, not just the current card, but all other cards are properly resized, without looping over all cards in the stack (possibly thousands).
I'm currently working on the latter part. 😅
OK, source-level debugger is shaping up pretty nicely. The "step" button still steps per instruction instead of per line, and the variable display shows all stack slots of the current handler, including temporaries, but the foundations are now all there.