Using KV lang on my Python code, I have taken a hard time trying to instantiate a dynamic class, the following Consider the code: My test.kv file looks like this: & lt; MyPopup @ popup: Title: 'Hello' size_hunt: (1, .6) Grid layout: ID: RouteGrid column: 2 padding: ['8dp', '4dp', '8dp', '4dp'] Difference: '8dp' label: text: 'some text here' button: text: 'OK' On_press: do_something () & lt; MyGrid & gt;: Rows: 1 Button: Text: 'Show Popup' on_press: root.pop.show () Then import Kivy.app into my test.py: I get the following error: raise Factory Exception ('Uncount Class' '% name) kivy.factory.FactoryException: Unknown class Can anyone tell me how to do this properly, what do I remember? If you need more information please let me know Thank you. Takes a call to the factory before the KV file is loaded, so you want the class to Are not yet in existence. As long as no clas...
Comments
Post a Comment