Totem
Totem

Reputation: 7349

Using Factory objects in kivy

I was just reading this page in the kivy docs about Factory objects. I was reading it in order to understand the example code given for the Filchooser in the kivy docs, here(ultimately, this is what I'm trying to understand). However, I don't really understand why the Factory object is used.. It appears to me, so far, that it is used to instantiate a class, like a one or two liner instead of a regular class definition. What does it actually do and why is it used?

Upvotes: 1

Views: 2007

Answers (1)

inclement
inclement

Reputation: 29450

I think this example may be very old, you don't need to worry about the Factory in general, widgets are automatically registered and you don't need to manually interact with it.

I'm not sure of everything the Factory is used for, but probably a core purpose is to keep track of widgets for use in kv language - they are looked up via the Factory.

Upvotes: 1

Related Questions