title: Don't understand this AttributeError:'str' object has no attribute 'text'
body: <p>I am making an application that will allow to display a running text in the window, but just started to parse the OOP, and I would like to know how to fix this error... There is also an example that works as needed, it will be shown below the script with an error.</p>
  
  <pre><code>class Main_Desktop():
  
      def __init__(self,parent,i,text):
          self.i=i
          self.parent=parent
          self.ticker=Text(parent,height=1,width=100)
          self.text=text
          self.ticker.pack()
          self.txt(i)
  
      def txt(self, i):
          i = 0
          self.text = ('' * 20) + self.text + ('' * 20)
          x = self.text[i:i + 20]
          self.ticker.insert("1.1", x)
          if i == len(self.text):
              i = 0
          else:
              i = i + 1
          self.ticker.after(100, lambda: Main_Desktop.txt(self.text[i:i + 20], i))
  </code></pre>
  
  <p>Here is an example and it works as needed:</p>
  
  <pre><code>root =Tk()
  text="string"
  text = (' '*20) + text + (' '*20)
  ticker = Text(root, height=1, width=20)
  ticker.pack()
  
  i = 0
  def command(x, i):
      ticker.insert("1.1", x)
      if i == len(text):i = 0
      else:i = i+1
      root.after(100, lambda:command(text[i:i+20], i))
  
  command(text[i:i+20], i)
  </code></pre>