It nothing changed still Onload skin is not loading. Please note that in 34 row i am closing session(?).
Beiträge von grzgrzgrz3
-
-
Looks like you do not undarstand what im looking for.
Please look at this there example what i want to do:
Python
Alles anzeigenfrom Screens.Screen import Screen from Components.Pixmap import Pixmap from Plugins.Plugin import PluginDescriptor from Components.ActionMap import ActionMap from enigma import eTimer class Onload(Screen): skin = """ <screen position="center,center" size="80,60" title="captcha"> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/test/logo4.png" position="0,0" size="80,60" transparent="1" alphatest="on" /> </screen>""" def __init__(self, session): Screen.__init__(self, session) print "onload running" self["actions"] = ActionMap(["OkCancelActions"], { "cancel": self.close }, -1) class start(Screen): skin = """ <screen position="center,center" size="80,60" title="captcha"> <ePixmap pixmap="skin_default/buttons/green.png" position="0,0" size="80,60" transparent="1" alphatest="on" /> </screen>""" def __init__(self, session): Screen.__init__(self, session) self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], { "green": self.opener, "cancel": self.close }, -1) def opener(self): ABC() self.close() class ABC: def __init__(self): print "ABC running" self.Timer = eTimer() self.Timer.callback.append(self.startscreen) self.Timer.start(1000*5, False) def startscreen(self): self.session = None #???????????? Onload(self.session) #??????????? #self.session.open(Onload) ??????????? def main(session, **kwargs): session.open(start) def Plugins(**kwargs): return PluginDescriptor( name="example", description=_("Example description"), where = [PluginDescriptor.WHERE_EXTENSIONSMENU, PluginDescriptor.WHERE_PLUGINMENU ], icon="logo4.png", fnc=main)
How to open Onload(Screen) correctly?
-
I have basic knowledge about that. I have just problem with this concrete situation. Can't find solutions. If you can show how to do that i ll be grateful.
-
For example i have something like that:
Pythonclass ABC: def __init__(self): self.Timer = eTimer() self.Timer.callback.append(self.startscreen) self.Timer.start(1000*60, False) def startscreen(self): #Here i want to open some screen
I cant use self.session.open() because there's no session. How can i do that? It is possible to get current session maybe?