Text in fields disappearing when switching stacks?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
skylerclooney
Posts: 1
Joined: Sat Sep 06, 2025 9:50 am
Contact:

Text in fields disappearing when switching stacks?

Post by skylerclooney »

Hey everyone,
I’m Skyler, pretty new to LiveCode (about a month in, personal license). I’m just messing around making small test projects, and I ran into something odd that I can’t figure out.
Basically, when I type in a text field on one stack, then jump over to another stack and back again, sometimes the text I typed is gone. It either resets to what it had before or just clears out. I’ve double-checked my scripts, there’s nothing that would delete the field contents. I even made a brand-new stack with just two fields and still had it happen.
Is this normal behavior, or maybe a bug? Or am I just missing some setting for fields? It’s a bit frustrating since I want to build forms where users can switch between windows without losing what they entered.
Thanks,
Skyler
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: Text in fields disappearing when switching stacks?

Post by richmond62 »

"when switching stacks" . . .

Do you mean independent stacks, or stacks that are all substacks of a single main stack?

Oh, and, are you finding this problem on Macintosh, Windows, or Linux?
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: Text in fields disappearing when switching stacks?

Post by richmond62 »

2 independent stacks, LC 10.0.0.2. MacOS 12:
-
Screenshot 2025-09-06 at 14.45.42.jpg
-
Seems OK round these parts.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: Text in fields disappearing when switching stacks?

Post by dunbarx »

It makes no difference if the other stack is a substack or not.

And what you describe is unheard of, impossible, if all you did is what you say.

Text entered into a field stays there if you navigate elsewhere. As long as the stack is saved when you close it, it will stay there forever. How many handlers in all do you have in the scripts of each stack? Is it possible to place a red dot breakpoint at the first line of each of them?

Craig
stam
Posts: 3214
Joined: Sun Jun 04, 2006 9:39 pm

Re: Text in fields disappearing when switching stacks?

Post by stam »

Assuming the OP is a real person, as Craig says this is not possible under normal circumstances.
The usual culprit would be user code that initialises the fields on preOpenStack, resumeStack or openStack.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: Text in fields disappearing when switching stacks?

Post by dunbarx »

Skyler does not seem like AI, although AI is becoming a much better writer every day.

Craig
Post Reply