On 2016-10-17 11:15, Graham Samuel wrote:
Thanks Jacque - wise words as always. The idea that the delete would
work depending on whether the stack was newly created had not occurred
to me, but seems like a good reason why my simplified tests didn’t
show the problem. I will try again to create a simple demo, and
hopefully I can file a bug report.

Thanks for the bug report (http://quality.livecode.com/show_bug.cgi?id=18612) - I was a bit puzzled about the situation you and Jacque described until I saw your code.

This isn't in fact a bug, just a subtle interaction with the stackFiles property of your 'Master' stack.

The stackFiles property maps names of stacks to filenames - it basically means that when the engine resolves a chunk reference 'stack <name>', if there is no stack in memory with the name <name>, then it will look through the stackFiles property of the stacks in memory to try and resolve it (starting with the stack of the script being executed). Furthermore, it resolves things relative to the path to the stack containing the stackFile line.

So, if you have a line 'DataStack -> DataStack.livecode' in the stackFiles, and if there is a DataStack.livecode file next to the stack containing that stackFiles line; a reference 'stack DataStack' will *always* resolve and load the stack.

Essentially, asking whether 'stack DataStack' or not exists doesn't work, because referencing the stack causes it to.

Warmest Regards,


Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to