title: Kivy: programmatically create widget IDs
body: <p>I can't comment yet, so forgive the related post. I'm having the same problem as this person: <a href="https://stackoverflow.com/questions/35150338/empty-list-of-ids-in-a-kivy-gridlayout">Empty list of ids in a Kivy GridLayout</a></p>
  
  <p>Though I've found a workaround as the answerer suggests, by storing references to my gridded objects as they're created, I would like to know if there IS a way to programmatically assign ids to widgets that can later be accessed through the parent's "ids" dictionary.</p>
  
  <p>For example, in the original question, the code adds widgets like this:</p>
  
  <pre><code>for i in range(81):
      row = i // 9
      col = i  % 9
      grid.add_widget(TextInput(id = str(row) + "-" + str(col)))
  </code></pre>
  
  <p>but the id property used here is apparently different than the id property if you assign it in a kv file.</p>
  
  <p>So the expected output is that the ids dict would look something like:</p>
  
  <pre><code>{"1,1": *objectreference@blahblah*, "1,2": *objectreference@blahblah*, .....}
  </code></pre>
  
  <p>but the actual output is: 
       {}</p>
  
  <p>Is there a way to make that work as expected? Relatedly, is it worth it to find that way/ is it better practice to create your own reference dictionary instead?</p>