How to loop through stacks with same name?

Bob Sneidar bobsneidar at iotecdigital.com
Thu Apr 6 14:55:29 EDT 2023


I just tried to close a stack using it's full path and it did sort of, BUT... it only closes the window. The Window menu in LC still shows the stack! The destroyStack and destroyWindow properties are both true. Is that the expected behavior??? 

There are of course other stacks in use, library stacks and behaviors. That may be the issue. Still, closing a stack should CLOSE the stack! 

In response to someone else's post, the ID of a stack is not really it's ID, it's the ID that gets assigned to the next object created in that stack, and then it gets incremented. There was talk some while back about assigning a REAL ID to a stack so we could deal with just this very issue. 

Bob S

> On Apr 6, 2023, at 11:15, R.H. via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I had all the same problems running through hundreds of stacks with the aim
> to take snapshots of each to easily identify a stack visually. The dialog
> for stacks with name conflicts always popped up. None of the methods worked
> for me. But I will try again.
> 
> I have a lot of stacks with different versions, same name, and I do not
> want to change the stack name since a stack is mostly not isolated and
> needs a fixed name to communicate with other stacks. My changes of version
> numbers are visible in the label name only.
> 
> One solution would be if it were possible to address a stack by id. But
> that does not work even though a stack has an id. And if it were possible,
> how to ensure that each id is unique?
> 
> The name conflict could probably only be solved by the Livecode team? It is
> annoying frequently. But there a side effects to any solution to think
> about first.
> 
> But I will try whatever may work.
> 
> Roland




More information about the use-livecode mailing list