ListView doesn't work with Kivy

417 views
Skip to first unread message

Victor F

unread,
Mar 26, 2019, 2:16:08 PM3/26/19
to Kivy users support
I downloaded Kivy today from github. Hello world works. But when I tried to execute (python3 main.py) this example:

from kivy.uix.boxlayout import BoxLayout
from kivy.lang import Builder
from kivy.base import runTouchApp

Builder.load_string("""
<MyListView>:
    ListView:
        item_strings: [str(index) for index in range(100)]
"""
)


class MyListView(BoxLayout):
   
pass

if __name__ == '__main__':
    runTouchApp
(MyListView())

and I'm getting this:

[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked Traceback (most recent call last):
   
File "main.py", line 16, in <module>
     runTouchApp
(MyListView())
   
File "/home/user/kivy/kivy/uix/boxlayout.py", line 131, in __init__
     
super(BoxLayout, self).__init__(**kwargs)
   
File "/home/user/kivy/kivy/uix/layout.py", line 76, in __init__
     
super(Layout, self).__init__(**kwargs)
   
File "/home/user/kivy/kivy/uix/widget.py", line 348, in __init__
     
Builder.apply(self, ignored_consts=self._kwargs_applied_init)
   
File "/home/user/kivy/kivy/lang/builder.py", line 469, in apply
     
self._apply_rule(widget, rule, rule, ignored_consts=ignored_consts)
   
File "/home/user/kivy/kivy/lang/builder.py", line 544, in _apply_rule
     cls
= Factory_get(cname)
   
File "/home/user/kivy/kivy/factory.py", line 131, in __getattr__
     
raise FactoryException('Unknown class <%s>' % name)
 kivy
.factory.FactoryException: Unknown class <ListView>

Please, tell if anybody at least looking into that.

Elliot Garbus

unread,
Mar 26, 2019, 3:18:41 PM3/26/19
to kivy-...@googlegroups.com

In the documentation:

Deprecated since version 1.10.0: ListView has been deprecated, use RecycleView instead.

--
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.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c699b078-a359-4118-92a7-b35d5a3847ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Victor F

unread,
Mar 26, 2019, 4:12:03 PM3/26/19
to Kivy users support
Indeed ! Thank you very much.
Reply all
Reply to author
Forward
0 new messages