Jump to content
Sign in to follow this  
Leopard20

When a display is closed, are its added event handlers removed?

Recommended Posts

Hey guys.


I'm making a mod which creates a display every time the user presses a key. I also add some keyDown event handlers to this display.


I was wondering whether or not I should add the keyDown event handler every time it's created? In other words, when a display is closed, are its added event handlers removed or not?

Share this post


Link to post
Share on other sites

If the display is completely closed, then you will need to re-assign the event handlers when the display is re-created.

  • Thanks 1

Share this post


Link to post
Share on other sites
6 minutes ago, MrCopyright said:

If the display is completely closed, then you will need to re-assign the event handlers when the display is re-created.

Thanks for your input.
I close the display in two ways:
1. By pressing Esc.
2. By using (_display closeDisplay 2)
 

Does it mean it's completely closed in both cases?

Share this post


Link to post
Share on other sites
4 minutes ago, MrCopyright said:

Yes.

OK. Thanks for your help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×