title: how do you access a widget that is in a different class in kivy
body: <p>How can I access the conditions value that is located inside my <code>CurrentWeather</code> widget from Python in my <code>AddLocationForm</code>? I want to edit the conditions value from my <code>AddLocationForm</code> instead of doing it in <code>CurrentWeather</code>. This is my code, so far:</p>
  
  <p><strong>Python:</strong></p>
  
  <pre><code>from kivy.network.urlrequest import UrlRequest
  import json
  from kivy.core.window import Window
  from kivy.uix.textinput import TextInput
  from kivy.uix.listview import ListItemButton
  from kivy.factory import Factory
  
  Window.clearcolor = (0.45, 0.3, 1, 0.5)
  
  class AddLocationForm(BoxLayout):
      search_input = ObjectProperty()
      search_results = ObjectProperty()
      currentWeather = ObjectProperty()
  
      def search_location(self):
          search_template = "http://api.openweathermap.org/data/2.5/weather?q={}&amp;appid=f8020ca79e2de4c1dd5a125c3f22fa18"
          search_url = search_template.format(self.search_input.text)
          request = UrlRequest(search_url, self.found_location)
  
      def found_location(self, request, data):
          data = json.loads(data.decode()) if not isinstance(data, dict) else data
          weather = "%s" %(data["weather"][0]["description"])
          root.WeatherRoot.CurrentWeather.conditions = weather #Problem is here
  
  class LocationButton(ListItemButton):
      pass
  
  class WeatherApp(App):
      def build(self):
          global root
          root = self.root
  
  if __name__ == '__main__':
      WeatherApp().run()
  </code></pre>
  
  <p><strong>Kv:</strong></p>
  
  <pre><code>#: import ListItemButton kivy.uix.listview.ListItemButton
  #: import ListAdapter kivy.adapters.listadapter.ListAdapter
  #: import main main
  
  WeatherRoot:
  
  &lt;WeatherRoot&gt;:
      AddLocationForm
  
  &lt;AddLocationForm&gt;:
      orientation: "vertical"
      search_input: search_box 
      search_results: search_results_list
      BoxLayout:
          height: "40dp"
          size_hint_y: None
          TextInput:
              id: search_box 
              size_hint_x: 50
              multiline: False
          Button:
              text: "Search"
              size_hint_x: 25
              on_press: root.search_location()
              background_color: (1, 0.5, 0.656, 1)
  
  &lt;CurrentWeather@BoxLayout&gt;:
      id: current_weather
      currentWeather: current_weather
      location: "" 
      conditions: ""
      temp: None
      temp_min: None
      temp_max: None
  
      orientation: "vertical"
      Label:
          text: root.location
          pos_hint: {'x': 0.435, "y": 1}
          font_size: '40dp'       
          size_hint_y: None
          size_hint_x: None
      BoxLayout:
          orientation: "horizontal"
  
          Label:
              id: curCon
              text: root.conditions
  </code></pre>