Sending text from one screen to another

  • 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:


    Code
    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.

    Dreambox 8000 with 1TB Western Digital Internal Hard Drive, 80cm Dish, Quad LNB, 1.2 Compatible Motor, Yamaha RX-765 Amplifier, Two Tannoy Custom F1 Speakers, Tannoy FC Custom Centre Speaker, Two Tannoy Custom FR Speakers, EPOS ELS Sub Woofer, Porty TV

    Einmal editiert, zuletzt von Sharkadder ()