Updating Text-Script Only Stacks in Run-Time, Message Path Memory

Monte Goulding monte at appisle.net
Sun Nov 6 16:00:11 EST 2016


> On 7 Nov. 2016, at 7:52 am, Mark Wieder <ahsoftware at sonic.net> wrote:
> 
> If I edit a behavior script then I expect objects using that behavior script to use the new features as soon as I compile the script. I would expect that the same would be true of script-only stacks: I edit the script, and on saving the text I would expect it to modify what the script does.

It does as long as you edit it in the IDE. If you don’t want to edit in the IDE then you need something like the external editor solution that is around or something that just polls the file to check for an update then applies the script.

> I don't expect that I would have to unload and reload (or whatever the proper procedure is) to get the code to stick.

You only need to do that if you don’t edit in the IDE. I don’t believe there’s ever been official support for editing stack scripts outside the IDE.
> 
> If the script doesn't compile then of course I wouldn't expect the executing code to change. But that's no different from the way things work now: my experience has been that script-only stacks will fail silently on errors or in ways that give no clue as to what went wrong.

The IDE doesn’t know much about script only stacks so I’d be surprised if any differences in behaviour can be attributed to the fact it’s script only. There really is very little difference between a script only stack and a regular stack other than reading and writing to disk and a single boolean flag in the class.

Cheers

Monte


More information about the Use-livecode mailing list