Stack with the same name loop

Pi Digital sean at pidigital.co.uk
Thu Oct 7 12:10:31 EDT 2021


> On 7 Oct 2021, at 15:49, Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Indeed, is this a multi-stack system which you are working on? Is there a way your code (which is being triggered somehow after save) is referencing the stack you just saved as, by its original filename?

It is a multi-stack system for sure. 114 substacks, 840 cards, 90,039 objects and counting. 

The stacks and cards only every reference themselves as ‘me’ or ‘this’. The preopenstack has a bunch of references to ‘start using stack “whatever”’ to run as libraries I’ve written. And then the openstack uses a dispatch to run a script from one of these libraries, closely followed by a ‘send “blah” to “aLib” in 0 sec with messages’ just to finish up. 

There is a preclosestack which is intentionally empty. The preopenCard and openCard of the first card in the mainStack only recall data from one of the library stacks into globals. Then runs a centreMe handler from the mainStack script which is just a ‘set the loc of this stack to the screenloc’. 

And that is it. No closeStack handler. 

I can reproduce it every time I do a saveAs. 

The ‘save/purge/cancel’ is only intuitive to you it seems because you understand the background. It doesn’t seem to make sense to us (and certainly not a newcomer) because we have only our experience from other software to go on and how we expect it to work. If we do a saveAs in any other ware, we would never see a purge option. Maybe just an ‘are you sure’ or a ‘this will have this kind of effect’ warning. So we would never expect this kind of behaviour from software and know what to do with it. Hence the immediate initial responses to my OP (which were hilarious by the way, much needed light relief). 

Thanks yet again. 

Sean




More information about the use-livecode mailing list