title: How can I remove onEvent from button widget in Corona?
body: <p>I am trying to remove onEvent listener from button widget. I tried to assign nil to onEvent attribute but it didn't work and lastly I tried this:</p>
  
  <pre><code>   buttonWidget : removeEventListener("touch", buttonWidget.onEvent)
  </code></pre>
  
  <p>I have several button like that and it just stopped all button's event listeners. What do you suggest?  How can I remove the event listener for one button widget? Thanks.</p>
  
  <p>Here is how I create my button widgets:</p>
  
  <pre><code>for i=0,2 do
   for j=0,8 do
      count=count+1
      letterBtn[count] = widget.newButton{
      id = alphabet[count], 
      left = 5+j*50,
      top = H-160+i*50, 
      label = alphabet[count],
      width = 45,
      height = 45, 
      font = nil, 
      fontSize = 18,
      labelColor = { default = {0,0,0}, over = {255,255,255}},
      onEvent = btnOnEventHandler 
      };
    end
  end
  </code></pre>
  
  <p>Can you tell me how can I remove onEvent later?</p>
  
  <p>Okey, I tried Button: setEnabled(false) but still it disables all buttons not just one. I already tried your second advice but it gives the same result. I am copying the rest of the code. Can you please look at it and tell me what I am missing?</p>
  
  <pre><code>local function checkLetter(e)
  if(guessWord) then
      for i=1, #guessWord do
          local c = guessWord:sub(i,i)
          if c==e.target.id then 
              letter[i].text = e.target.id
              letterCount = letterCount +1
              print("letterCount"..letterCount)
              e.target:setEnabled(false)
          end
      end
      if (letterCount == #guessWord and not hanged) then
          timer.performWithDelay(500, function() 
              letterCount=0
              rightWGuess = rightWGuess+1
              for k,v in pairs(notGuessedWord) do 
                  if v == guessWord then  
                  notGuessedWord[k]=nil
                  end
              end
              enableButtons()
              startGame() end ,1)
      end
  end
  end
  
  
  
  local function btnOnEventHandler(e)
     if(e.phase == "began") then
      checkLetter(e)
      print(e.target.id)
     end
      return true
  end
  </code></pre>