raise FactoryException('Unknown class <%s>' % name)
kivy.factory.FactoryException: Unknown class <FilechooserIconView>
import kivykivy.require('1.9.1')from kivy.app import Appfrom kivy.uix.label import Label from kivy.properties import ListPropertyfrom kivy.graphics import Color, Rectangle from kivy.uix.floatlayout import FloatLayout from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.widget import Widget from kivy.uix.textinput import TextInput from kivy.uix.camera import Camera from kivy.core.audio import SoundLoaderfrom kivy.uix.popup import Popup from kivy.lang import Builder
import os
#kv filekv = '''#:import Factory kivy.factory.Factory
BoxLayout: orientation: "vertical" Upper_bar: size_hint: (1, 0.1)
Label: text: "Select Mode" size_hint: 1, .9 font_size: 50 BoxLayout: padding: 200 Button: text: "Object" size_hint: .5, .0 font_size: 50 on_press: Factory.ObjectPop().open()
Button: text: "Street" size_hint: .5, .0 font_size: 50 on_press: app.button_click_callback2(self) #Button callback
<Upper_bar>: BoxLayout: Button: size_hint: (0.3, 1) text: 'INFORMATION' on_press: Factory.InformationPop().open()
#Information Popup<InformationPop@Popup>: size_hint: 0.5, 0.5 title: 'INFORMATION' auto_dismiss: False #close를 눌러야 종료 BoxLayout: orientation: 'vertical' Label: text: """AIObjectCameraApp Name: Student Number: E-mail: """ Button: text: 'Close' on_press: root.dismiss() size_hint_y: None height: '40dp'
#Object Popup<ObjectPop@Popup>: title: 'Select Picture' auto_dismiss: False size_hint: (0.9, 0.9)
BoxLayout: size: root.size pos: root.pos orientation: 'vertical' FilechooserIconView: id: Filechooser
BoxLayout: size_hint_y: None height: 30 Button: text: 'Select' on_release: app.Save_path = filechooser.path root.dismiss()
Label:
Button: text: 'Cancel' on_release: root.dismiss()'''class Upper_bar(BoxLayout): pass
class ObjectPop(Popup): def __init__(self, **kwargs): super(ObjectPop, self).__init__(**kwargs) self.ids['filechooser'].path = os.getcwd()
class AIObjectCameraApp(App): save_path = os.getcwd()
pass
def button_click_callback2(self, instance): #Callback print2 print('You Select %s' % instance.text)
def build(self): return Builder.load_string(kv) #kv Builder(pass)
if __name__ == '__main__': AIObjectCameraApp().run() FileChooserIconView
Not:
FilechooserIconView
See highlight below.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/73ea06f4-13a3-4e3c-8de3-8cac6fdfe37e%40googlegroups.com.
self.ids['fileChooser'].path = os.getcwd() KeyError: 'fileChooser'
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
FileChooserIconView:
id: filechooser
Not id: Filechooser
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/97eceefc-aa54-495e-89ac-88a25cba75bd%40googlegroups.com.