title: Kivy - Can't change .text with id
body: <p>I am trying to change the text of a label using an id, I tried it with stringProperty, with objectProperty without any properties. There has to be something I am missing in my code because it simply does not work whatever I try and any help would be greatly appreciated.</p>
  <p>This bit of code is a simple screen with 2 buttons, one for going to the other screen and one for changing the label</p>
  <pre><code>from kivy.app import *
  from kivy.uix.button import *
  from kivy.graphics import *
  from kivy.uix.widget import *
  from kivy.uix.label import *
  from kivy.uix.floatlayout import *
  from kivy.uix.boxlayout import *
  from kivy.uix.relativelayout import *
  from kivy.uix.scrollview import ScrollView
  from kivy.properties import ListProperty, StringProperty,ObjectProperty
  from kivy.uix.screenmanager import ScreenManager,Screen
  from kivy.core.window import Window
  from kivy.lang import Builder
  from kivy.uix.gridlayout import GridLayout
  
  class WindowManager(ScreenManager):
      pass
  
  class Name(FloatLayout):
      def __init__(self, **kwargs):
          super(Name, self).__init__(**kwargs)
      def changeName(self):
          print(self.ids)
          self.name = self.ids.nameOfSong.text
          print(self.name)
          self.ids.nameOfSong.text = 'name'
          self.name = self.ids.nameOfSong.text
          print(self.name)
  
  class MainWindow(Screen):
      def __init__(self, **kwargs):
          super(MainWindow, self).__init__(**kwargs)
          self.pos = (0, 0)
          self.size = (1,1)
          self.z = Name()
          self.add_widget(self.z)
      def swap(self):
          Name().changeName()
  class SecondWindow(Screen,BoxLayout):
      def __init__(self, **kwargs):
          super(SecondWindow, self).__init__(**kwargs)
  
  class langApp(App):
      def build(self):
          sm = ScreenManager()
          sm.add_widget(MainWindow(name='main'))
          sm.add_widget(SecondWindow(name='second'))
          return sm
  
  Builder.load_file(&quot;kiv.kv&quot;)
  if __name__ == '__main__':
      langApp().run()
  </code></pre>
  <p>My kiv.kv file, most of it is not connected to the problem (I think)</p>
  <pre><code>#:kivy 1.11.1
  WindowManager:
      MainWindow:
      SecondWindow:
  
  &lt;MainWindow&gt;:
      name: &quot;main&quot;
      FloatLayout:
          pos: 0,0
          size: root.width,root.height
          Button:
              on_release:
                  root.manager.transition.direction = 'left'
                  app.root.current = &quot;second&quot;
              text: 'Stop'
              pos_hint: {'x':.45,'y':.1}
              size_hint: .1,.1
          Button:
              on_press: root.swap()
              text: 'Next'
              pos_hint: {'x':.65,'y':.1}
              size_hint: .1,.1
  
  &lt;SecondWindow&gt;:
      name: &quot;second&quot;
      FloatLayout:
          pos: 0,0
          size: root.width,root.height
          Button:
              on_release:
                  root.manager.transition.direction = 'right'
                  app.root.current = &quot;main&quot;
              text: 'Stop'
              pos_hint: {'x':.45,'y':.1}
              size_hint: .1,.1
  
  &lt;Name&gt;:
      Label:
          text: nameOfSong
          font_size: 20
          size_hint: None, None
          pos_hint: {'x': 0.435, 'y': 0.25}
  </code></pre>