You could use the clock:
def __init__(self, **kwargs):
super(CustomButton, self).__init__(**kwargs)
Clock.schedule_once(self.addMyName, 0) # executed next frame
def addMyName(self, *args):
self.text = 'Martin ' + self.text
It's not perfect though, as it assume that you add the widget to a
parent just after creating it, but i understand it's fine for your use
case, if it was different, i guess you would put that in on_parent.
cheers
> El jueves, 22 de agosto de 2013 16:59:37 UTC-3, Mathieu Virbel escribi�:
> >
> > Hey Martin,
> >
> > Yes you can safely save it in a json. Best is just to use
> > App.user_data_dir property for the directory:
> >
> > from os.path import join
> >
> > def on_pause(self):
> > fn = join(self.user_data_dir)
> > with open('state.json', 'w') as fd:
> > json.dump(self.yourstate, fd)
> >
> > Or something like that :)
> >
> > Mathieu
> >
> > Le 22/08/2013 14:52, Martin Guillermo Acosta a �crit :
> > > Hi guys, recently I finish a kivy application for android and now I'm
> > > thinking in improve the perfomance caching the data json that I'm
> > > getting from internet and use in my app.
> > >
> > > What is the best solution to save this data json in android and ios? a
> > > file in sd or a with a database of the device?
> > >
> > > Important: in my json I have some private information, so is complicated
> > > save the information in the sd because the user has directly and public
> > > access.
> > >
> > > Sorry for my english, I wish you could help me!
> > >
> > > Thanks!!
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Kivy users support" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > > an email to
kivy-users+...@googlegroups.com <javascript:>.