Forum Discussion
Show Object on second visit/revisit
Your pattern is sound — and the fact that it works in a test layer is the biggest clue. The triggers are right, so something else in that layer is interfering. Two places I'd check:
1. The variable type. Open Manage Project Variables and confirm Sites_Profil_ChangePassword is a True/False variable, not text. If it's text, setting it to "Right" while checking "is true" will never match — both sides have to agree exactly.
2. A conflicting trigger on that layer. Search the layer's trigger panel for anything else touching the textbox or the variable. Triggers run top to bottom, so a later "hide" trigger silently wins over your "show". A test layer has no competition; a layer with weeks of work behind it usually does.
Layer reset doesn't touch variables, so the True value survives the revisit — that's why the pattern works in principle. My money is on #2.
Thanks, Ronald. Afters hours of testing it looks like a damaged file. See attached file.
I reduced my original file to the core. If you switch between layers, the text won't appear. As soon as you hide the layer and revisit, the text is shown.
Or do I miss anything?
- ronald-hicks7 hours agoCommunity Member
Nice work isolating it to a repro file — that rules out half the suspects right there. And honestly, what you describe (fails when switching layers, works after hiding and revisiting) points me away from file damage and toward trigger timing. With "Reset to initial state," hiding and reshowing restarts the layer timeline, so your timeline-based state change fires again — this time with the variable already True. When you just switch layers, that timeline point already passed before the variable flipped, and nothing re-checks it afterward.
So the fix: stop relying on the timeline to do the state change. Replace that trigger with "Change state of [textbox] to Normal when variable changes, if Sites_Profil_ChangePassword = True." Then it fires the instant the variable flips, wherever the timeline happens to be. One more thing to check while you're in there: make sure no other trigger sets that textbox back to Invisible on timeline start — that would produce exactly the same symptom.
- TH-bf52b1b3-f6f5 hours agoCommunity Member
Thanks Ronald,
you have good suggestions.
I tried them out and played through each thing. Same problem.
The change state on variable change causes the text to come up to early because the variable "must" change at timeline event.But today I learned about the variable usage overview. So that looks odd. In real, the variable is used 3 times. The overview of the old variable is showing 5 times. It mentions layer names, that dont exist, as I changed them.
I replaced this old variable with a new one, I created. This one is 3 times used, though, I replaced it in all 3 visible triggers.
Related Content
- 10 years ago
- 5 months ago
- 1 year ago