frostbyte000jm
May 4th, 2021, 03:07
I previously asked a question about getting a value in the header subwindow when in the content subwindow. I had to do something like:
local sName = window.parentcontrol.window.header.subwindow.name. getValue();
Now I am on the charsheet and I have a page called Combat. On the page I have a buttoncontrol with 2 states, a number field, and a windowlist.
The window list is using a windowclass called detail. In there I have a button and I am just trying to pull the values from the buttoncontrol and the number.
The number is super easy:
local winChar = window.getDatabaseNode().getParent().getParent();
local Val = winChar.getChild("num_test").getValue();
Debug.chat("Val: ",Val);
But I can't pull the state of the button the same way. On the Combat Tracker I just registered the window to a lua file and then used that to get the value. But that only works when there is only 1 window you will open. If I open a second character sheet it registers that character to the control and obviously that will not work.
I made sure that I can getValue() the button if I am on the same page using window.btn_test.getValue();
How do I get out of the detail, out of the windowlist, on to the page so I can call btn_test?
local sName = window.parentcontrol.window.header.subwindow.name. getValue();
Now I am on the charsheet and I have a page called Combat. On the page I have a buttoncontrol with 2 states, a number field, and a windowlist.
The window list is using a windowclass called detail. In there I have a button and I am just trying to pull the values from the buttoncontrol and the number.
The number is super easy:
local winChar = window.getDatabaseNode().getParent().getParent();
local Val = winChar.getChild("num_test").getValue();
Debug.chat("Val: ",Val);
But I can't pull the state of the button the same way. On the Combat Tracker I just registered the window to a lua file and then used that to get the value. But that only works when there is only 1 window you will open. If I open a second character sheet it registers that character to the control and obviously that will not work.
I made sure that I can getValue() the button if I am on the same page using window.btn_test.getValue();
How do I get out of the detail, out of the windowlist, on to the page so I can call btn_test?