BenjaminUC 0 Share Posted April 2, 2020 Hi, It is easy to add/register a new EventListener with: getClient().getInstance().addEventListener(listener); However, I haven't been able to find where to unregister it again. I am aware of the many removeXListener methods in the Canvas class Specifically I'm registering PaintListener's dynamically based on the current executing Node. (I'm using my own custom Node structure not TaskNode) It seems that when you stop and start the script, the previous registered listeners are still registered and thus not removed when the script is stopped. How and where do you unregister an EventListener (PaintListener)? Link to comment Share on other sites More sharing options...
BenjaminUC 0 Author Share Posted April 8, 2020 Bump Link to comment Share on other sites More sharing options...
BenjaminUC 0 Author Share Posted April 15, 2020 Bump Link to comment Share on other sites More sharing options...
Jort 2 Share Posted May 1, 2021 (edited) I have the same problem, paint gets drawn twice when script is restarted. I dirty-solved it by creating a new method in my custom painter class which 'disables' it, which I call in onExit() Edited May 1, 2021 by Jort Link to comment Share on other sites More sharing options...
flappygoat 1 Share Posted August 19, 2021 Bump Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now