title: Error using checkmouse
body: <p>I'm trying to use checkmouse in order to undraw something from my window. When someone clicks the button it should undraw the text and write something else. I'm using checkMouse and getX() and getY() to do this but i keep receiving this error that states: </p>
  
  <pre><code> File "C:\Users\User\Documents\python\project2.py", line 71, in panel
      if (clicknew.getX()&gt;90 and clicknew.getX()&lt;210) and (clicknew.getY()&gt;35 and clicknew.getY() &lt; 0):
  AttributeError: 'NoneType' object has no attribute 'getX'
  </code></pre>
  
  <p>this code that i have done so far is as follows:</p>
  
  <pre><code>from graphics import *
  
  #creating the game panel window
  def panel():
      #grey window, with coordinates flipped, with banners etc
      win = GraphWin("Start Panel", 300,200)
      win.setCoords(0,0,300,200)
      win.setBackground("light grey")
      #drawing the BoilerMazer banner with text
      boilermazer = Rectangle(Point(0,200),Point(300,160))
      boilermazer.setFill("white")
      boilermazer.draw(win)
      #text inside
      banner1 = Text(Point(150,180),"BoilerMazer")
      banner1.setStyle("bold")
      banner1.setSize(20)
      banner1.draw(win)
      #initial game panel is going to have two buttons and a top scores object
      #top score "screen"
      toprec = Rectangle(Point(60,140),Point(240,50))
      toprec.setFill("white")
      toprec.draw(win)
      #text inside toprec
      topscores = Text(Point(150,130),"TOP SCORES")
      topscores.setSize(8)
      topscores.draw(win)
      border = Text(Point(150,120),"======")
      border.draw(win)
      bigmac = Text(Point(150,110),"Big Mac     21")
      bigmac.setSize(8)
      bigmac.draw(win)
      tt = Text(Point(150,90),"T.T     23")
      tt.setSize(8)
      tt.draw(win)
      cshell = Text(Point(150,75),"C-Shell     25")
      cshell.setSize(8)
      cshell.draw(win)
      macmac = Text(Point(150,55),"MacMac     27")
      macmac.setSize(8)
      macmac.draw(win)
      #new player button that will eventually be clicked
      new1 = Point(90,35)
      new2 = Point(210,0)
      newrec = Rectangle(new1,new2)
      newrec.setFill("chartreuse2")
      newrec.draw(win)
      #new player button text
      newplayer = Text(Point(150,18),"NEW PLAYER")
      newplayer.draw(win)
      #reset button
      resetrec = Rectangle(Point(240,35),Point(300,0))
      resetrec.setFill("red")
      resetrec.draw(win)
      #resettext
      reset = Text(Point(270,18),"RESET")
      reset.draw(win)
      #secondary panel window is the game panel after they click new player
      #set up points that we check between for the new player button first
      #setting up the checkmouse
      clicknew = win.checkMouse()
      if (clicknew.getX()&gt;90 and clicknew.getX()&lt;210) and (clicknew.getY()&gt;35 and clicknew.getY() &lt; 0):
          newplayer.undraw()
  </code></pre>
  
  <p>you can find the graphics window here:<a href="http://mcsp.wartburg.edu/zelle/python/graphics.py" rel="nofollow noreferrer">http://mcsp.wartburg.edu/zelle/python/graphics.py</a></p>
  
  <p>I don't understand what I'm doing wrong, is there some other method that I'm supposed to be using? Thanks for your help</p>