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 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() 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
Archived
This topic is now archived and is closed to further replies.