Ginklings/pysga

Problem with kv-file classes initialization

Closed this issue · 1 comments

Changing the version of kivy and its dependencies, the app get error when initializate the main class of kv-file:

Traceback (most recent call last):
File "", line 1, in
File "C:\ProgramData\Anaconda3\envs\MemorialApp\lib\site-packages\kivy\app.py", line 828, in run
self.load_kv(filename=self.kv_file)
File "C:\ProgramData\Anaconda3\envs\MemorialApp\lib\site-packages\kivy\app.py", line 599, in load_kv
root = Builder.load_file(rfilename)
File "C:\ProgramData\Anaconda3\envs\MemorialApp\lib\site-packages\kivy\lang\builder.py", line 301, in load_file
return self.load_string(data, **kwargs)
File "C:\ProgramData\Anaconda3\envs\MemorialApp\lib\site-packages\kivy\lang\builder.py", line 399, in load_string
widget = Factory.get(parser.root.name)(__no_builder=True)
File "C:\ProgramData\Anaconda3\envs\MemorialApp\lib\site-packages\pysga\sgaApp.py", line 23, in init
self.get_from_file.bind(active=self.on_checkbox_active)
AttributeError: 'NoneType' object has no attribute 'bind'

Probably, Using a Clock.schedule function to bind the class's property when init the class will resolve the problem.

Done. Commit 56a2a1b