title: tkinter: global name is not defined
body: <p>I am always getting an error message when I try to run this code.
  I have the Tkinter documentation and have read it. I am trying to put text into a field that will disappear once a person starts typing. Here is the code.</p>
  
  <pre><code>class MyGrid(Frame):
      def __init__(self, win=None):
          Frame.__init__(self, win)
          self.grid()
          self.mkWidgets()
  
      def mkWidgets(self):
          self.mytext = StringVar()
          self.mytext.set("Enter text here")
          self.e = Entry(bg='orange', textvariable=mytext, relief=SUNKEN, width=45)          
          self.e.grid(row=0, column=0)
  
  app = MyGrid()
  
  app.mainloop()
  </code></pre>
  
  <p>I always get this error:</p>
  
  <pre><code>NameError: global name 'mytext' is not defined
  </code></pre>