Start a new topic

Global Variable Scope

I am using an arduino to try to read and write the value of a global variable using 


getValue

setValue


However, even though the variables scope is set to global I cannot read/write to it unless the page with the variable on is visible. 


I have also tried


    uint32_t Max = 2147483647;

    Page0.Code.setValue(2147483647);


which doesnt work.


Does anyone know what I am doing wrong?


Answer must have been in minimum 20 other threads (Search bar above)


Reviewing the code for getValue() and setValue() in library file reveals how it is parsed

get

  get n0.valÿÿÿ

set

  n0.val=23ÿÿÿ


This is parsed from the declaration.  "n0"  page 0 .id 23

NexNumber mynum = NexNumber(0,23,"n0");


So when wanting to access a global - page prefix

perhaps doing do in the declaration might  make sense?


NexNumber mynum = NexNumber(0,23,"page0.n0");

But:


This is not a BUG in my Report A Bug Section

This mentions nothing about Peer Reviewed vetting as a BUG


Queue Jumping is frowned upon by the Community.

Seeking out preferential treatment for your questions.


Not understanding your MCU side code is neither

 - a bug of Nextion Editor or a bug of Nextion Firmware


So, please be more considerate of the community in the future.

I am sorry, I did not mean to queue jump. That was not my plan

Login or Signup to post a comment