This command "ref 0" was described (and still it is in nextion tutorials) as refreshing "current page" whatever it is. I use it this way in my code.
Now I see the instruction page says that "ref 0" refreshes page #0
Now it does not imply "any current page" any more. Was this changed in subsequent versions?
If so, older tutorials are wrong now and I have to change code for a current version.
vis 255,0 (where 255 is caught to branch to a segment of code for all components) versus
vis 0,0 (which is to hide ID 0 or the current page as all pages have ID of 0) renders a skipped component, and thus all following components (items on the page) do not have a need reference boundary of where on "the page" they are suppose to start. Pages do not need to actually fill their screens, this is only a default setting, so knowing page left + offset of component on page - becomes critical and faults if the page component has been skipped.
As for the Ref 0, you are indeed correct, is the current page. As pages have ID 0 then ref 0 is to refresh the actual Page Component with ID 0 (which its routine subsequently sequentially refreshes all other components until the end of Components is reached or until another page is encountered).
page 0 //Refresh page 0
should be saying "refresh whatever current page is" . It will be "0" page only in case if it is "currently active" - is it right?
page 0 //Refresh page 0As wording goes, It unambiguously implies that "page 0" will refresh "page 0" (not a string name but ID number), "page 1" will refresh "page 1" , etc...... Yet, as per your explanation ALL pages have ID=0 therefore above comment should have read "refresh current page" whatever it is not necessarily page 0... This is creating confusion through documentation and then you try hard to straighten it out as if the problem is a stupid user.
And the last point to help is who is creating the software, who is doing the technical translation and who is the one needing to use it. And the software starts in Chinese, which needs to be understood well by the person doing the translations for documenting it into English. This translator may not always have the most firmest grasp on the super technical side effects or implications of the command, maybe their weren't shown every aspect of its limited flexibility. Then we as users need to actually use that information for doing our highly technical project - and the implications of the translations have side effects on our projects that we were not expecting. Maybe if the documentation was being done by actual users that have used all of the possible iterations, who understand the importance that someone needs to rely on the information that is being written ... maybe then there would be less confusion surrounding commands and how to use them, or better explanations and less ambiguity.
You know what, for the sake of other people reading all of this. It is noteworthy and my OCD is kicking in.
The Nextion Instruction Set should NOT read page 0 //Refresh page 0 and maybe this is why my OCD is in overdrive. Having not used these words previously, I will state:
So while this has little bearing on a simple project, it will definitely screw up a more detailed project, and leave the users either wondering why it fails, or it crimps the user from using the commands for what the translator did not properly describe or include. The description of the page command most definitely negated to mention anything surrounding the order of loading and its consequences when calling page 0.
If I had a slider, and I make a change not auto-updated, I want to be specific to ref h0 and not having my globals interfered with by what was in the HMI defaults before the program was running.
Does this make sense. Thumbs are fingers, but not all fingers are thumbs. Therefore page does some ref but not all ref are page.
Thank you Edwin. =) So for certain the Nextion Instruction Set currently does not properly describe the page command and should not be introducing ambiguity. So there was indeed a reason the OCD was kicking in last night and my insanity wasn't groundless without cause and for naught.
I certainly reserve using page for the purposes of changing pages, and ref for the purposes of refreshing an individual component. In the interest of accuracy for now, I have removed the posts that are in question and I will hunt down the version of the Editor for which it had held true. Perhaps it was the introduced behaviour of a bug that has since been changed.
The forum certainly could use an edit function to fix a small erroneous part rather than having to redo the entire post and there really needs to be a section that can contain more detailed and accurate information rather than skimming a million pages for what may be correct and not. Thank again
I'll be clear on why I try and spend the time to write longer more detailed answers, and it most certainly wasn't to waste my time on ego. I found it harder to learn what I needed from threads with short responses but no explanation, I am certainly not the only one. The net is filled with short responses and no answers, so when I try to give back here, it is for the 100 users that arrive later looking for an answer because they may have a similar problem. So am I perfect, hell no - I am only human.
> Please Let me know if you find how to refresh current page