I just spent 2 hours purging the detestable “this stack” from my entire list of projects. If you use substacks, if you hide and show stacks, this stack simply unreliable. Instead put this at the head of every script that needs to know what the parent stack is:
put getParentStack(the long id of me) into tParentStack and have this in a library or active script somewhere: function getParentCard pObjectID put offset("card id", pObjectID) into tStartChar put char tStartChar to -1 of pObjectID into tCardID return tCardID end getParentCard function getParentStack pObjectID put offset("stack ", pObjectID) into tStartChar put char tStartChar to -1 of pObjectID into tParentStack return tParentStack end getParentStack Now you will know ABSOLUTELY which stack you are in from any object on any card. And no, I’m not senile (much yet) I know I already posted this some time ago. Bob S _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode