jjwallace Posted March 1, 2016 Share Posted March 1, 2016 Is there a correct way of doing this? For some reason it cannot find remove clickButton: function () { //this.uiGroup.remove(); this.remove(this.uiGroup); }, Link to comment Share on other sites More sharing options...
fillmoreb Posted March 1, 2016 Share Posted March 1, 2016 My guess is you have a scoping issue with this. You should be able to bind this to the function you're calling when you add the event listener. Something like: myButton.onClick.add(clickButton, this); If that doesn't work, you'll need to post more code so we can see better what the problem might be. Link to comment Share on other sites More sharing options...
Recommended Posts