Hi, i have created a small plugin on python but i am stuck on how i can send text from one page to another, i know that i need to use a session callback but i am not sure how to do it.
How can i send the current index from a list called "mylist" and store it's value on another screen when i press the ok button?
So far i have this:
def ok(self):
itemnumber = self["mylist"].l.getSelectedIndex(self)
self.session.open(MyTestScreen2)
So when i run that, i'd like a new session to open called MyTestScreen2 and the variable itemnumber to be passed to a label within that screen called mylistindex. How do i do this?
I know i cannot put mylistindex.text = itemnumber because itemnumber is local to the previous session only.
Thanks
EDIT i managed to solve my problem by adding in an extra parameter when setting up a new window, i supply the window with an extra parameter and it displays the right value. People who are interested in passing data between windows in future might be interested to know this.
I post my plugin once completed.