LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I have a login stack (1 card only which contains the field "field_Username" in question).
Upon successful login it calls a second stack which also contains a single card.
When a button on this card is pressed (which results in calling yet another stack with 4 cards), the error I described happens - after I have long left the first stack.
So how can it complain about something in the first stack's preOpenStack upon leaving the second stack???? BTW, I do a "close this stack" before I go to the scond stack....
You are using substacks, aren't you? Indeed, the message path gets in the way here.
You can easily solve this problem by moving the openStack and preOpenStack handlers of your mainstack to the script of the first card of your mainstack. This way, the scripts don't run when you open a substack, because the script of the first card of the mainstack is not in the message path that is followed by a message sent by a button of a substack.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode