Main stack and substack order in the message path

Jim Bufalini jim at
Fri Feb 27 12:59:31 EST 2009

Hi Scott,
> The workaround might be to have stack A call "start using stack ABC"
> (and
> the same with the other stack) to make sure the substack is used first
> when
> necessary.

This is done and it is actually the problem.

I actually discovered this in two ways working on an update for ListMagic.
When you first install a ListMagic widget into your project, ListMagic
clones its lib, renames it, and places the renamed lib stack as a substack
of the main stack of your project and adds a start using statement to your
project's main stack's preOpenStack.

When a new version of ListMagic comes out, and you add a new widget, or
modify an existing widget in a project, ListMagic checks, and if it sees
that it is a newer version than the one you have in your project, it asks
for permission to update the lib in your project and all widgets. 

But, if you don't do either and just have your project and ListMagic running
at the same time in the IDE, then it is possible to have two different
version libs running at the same time and there is no way to control if a
user has launched their project first or ListMagic.

Or, for that matter, two of their own projects, where one has been updated
to the latest lib and one has not. Which one did they launch first?

This now explains to me how people can be reporting an issue that has been
fixed. I ask them are you sure you are running the latest version? And they
say "Yes!" Hmmm...

The other way I discovered it is that right now, when you delete a ListMagic
widget from a card by simply selecting either the list or header with the
browse tool and hitting the delete key, ListMagic automatically removes
everything to do with the widget you are deleting from the card. If it is
the last widget in all cards of the stack, ListMagic completely removes
ListMagic from your stack except for deleting the ListMagic substack lib

Because people were doing this manually and forgetting to remove the "start
using" statement from the preOpenStack of their project's main stack, I
decided to add this delete of the ListMagic lib and "start using" statement
to the automated delete process and used a "Delete me". I was surprised to
find this executing out of the ListMagic lib and not the test project lib
where I had hit the delete key and was doing the delete. :-(

Jim Bufalini

More information about the Use-livecode mailing list