[英]kivy says I have multiple screens with the same name
Kivy keeps telling me that I have multiple screens with the same name for all my screens and I don't have and i think that's why some code I am trying to run doesn't seem to work. Kivy 一直告诉我,我的所有屏幕都有多个同名的屏幕,而我没有,我认为这就是为什么我尝试运行的某些代码似乎不起作用的原因。 need assistance.
需要帮助。
here's my Window manager这是我的 Window 经理
<ScreenManager>:
id: window manager
Homepage:
id: home
name: "home"
SignUpWindow:
id: create
name: "create"
SignUp:
id: signup
name: "signup"
LoginWindow:
id: login
name: "login"
ProjectListScreen:
id: project_list_screen
name: "project_list_screen"
ApplyPage:
id: applyingpage
name: "applyingpage"
MainWindow:
id: main
name: "main"
NewProjectScreen:
id: placements
name: "placements"
ProfileWindow:
id: page
name: "page"
Kivy automatch the classes that inherit the App class with it's class's name. Kivy 自动匹配继承应用程序 class 的类及其类名。 For example if your class that inherit the App class is
class TestApp(App):
it will be matched with test.kv or Test.kv例如,如果您继承应用程序 class 的 class 是
class TestApp(App):
它将与 test.kv 或 Test.kv 匹配
if you also used builder to load kv file (for example with open("test.kv") as kvfile:
) as a result, you would load kvfile twice.如果您还使用 builder 加载 kv 文件(例如
with open("test.kv") as kvfile:
),您将加载 kvfile 两次。 so you're system tell you that you have multiple screen name.所以你的系统告诉你你有多个网名。
solution 1. change your kv file name.解决方案1.更改您的kv文件名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.