I want to be able to:
1. click a text component.
2. Jump to a keypad
3. enter in text, number, etc via keypad
4. hit enter
5. have the number go back to the text component clicked.
All without using the android controller..
And be able to use the exact same key pad page with any text box.
So to implement this we need a "pointer"
If the keypad has a global variable (txt) then before calling the keypad we can set.
Keypad.Pointer.txt="Home.TextField.txt" //Pointer to where we want to store the returned value. Our pointer.
Keypad.Register.txt=Home.TextField.txt //Assign the current value to the keypad register
Keypad.Back.val=9 // The current page number.
When you click enter on the Keypad Page it would do the following.
*(Keypad.Pointer.txt)=Register.txt //Dereference the pointer to the component and set the value to the keypad register.
page Keypad.Back.val //go back to the last page.
See the blog.
I am now reviewing all of the Feature Requests, this will take some time, patience please.
Component pointers available to global variables via objnames page0.va0.txt - implemented
Tutorial exists - nothing to carry forward.
I can't get the pointers to work. I've created a general purpose numeric keypad to enter IP addresses.
So, here's an extract of the code:-
I have a global text variable KEYBOARD.Pointer
2. print KEYBOARD.Pointer.txt
In theory, this should set the value of KEYBOARD.PIN_DISP to "1234". However, it causes a compile error instead
If I comment out line 3, the code will compile:-
Line 1 sets the pointer to the text variable
Line 2 display the string value "KEYBOARD.PIN_DISP.txt"
If I then un-comment line 3 and re-compile, Line 3 errors out at compile time.
What I'm trying to achieve is that I set the value of KEYBOARD.Pointer.txt to another text variable so that I can re-use the keypad on different screens.KEYBOARD.Pointer is a global
It appears that the Nextion doesn't accept the indirection pointer construct *(), whereas your example indicates that it does. I can;t find any example of pointers to variales in the Nextion documantation.
The concept of a re-usable keypad is justtoo useful not to persist in this. Any ideas?
No ideas here when this Forum is Closed.