Nextion editor, trying to change text between pages in the editor

I am using the nextion editor and I am trying to use a global variable to change the text of a button on a page from a button press on another page, but receiving "invalid variable" error message

setup:
page1
-button1:

page2:
-button2: when pressed, I want the text of button1 to change to the text of button2

First, I set the vscope for both buttons to global, then I simply had the Touch Press Event for button2 do this (b1.txt=b2.txt).

Then, I tried creating a global variable va1. On button press I had

va1.txt=b2.txt
b1.txt=va1.txt

I keep receiving an error message that va1 is an invalid variable even though it's scope is global. How should I go about changing the text on the first button through the button press of the second button?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.