Problem with threads
Radek Podgorny <[email protected]> Wed, 27 Apr 2005 23:57:02 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
Hi! Consider the following case: I create a window with a button inside. I create a thread that contains an endless loop which updates the button's caption periodically. When I close the window, I get an exception (null pointer in wx-native code) which is 100% correct because by the time I call the button.text (or whatever), the button does not exist. I know I have to stop the thread first but the problem is that I don't know how to do it (WHERE to do it). I've tried the wx.Window.Closing event and it didn't help. No luck with wx.Window.Dispose or destructor either. What is the preffered way of postponing the window deletion until I'm finished with my stuff? Thanks for any help... Radek Podgorny -- GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x98E56D84
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBCcAqx7mej6pjlbYQRAg3RAJ47oMfmY27JrtRTEV9BdiffatyRzQCeKqkh djU15D5GeKEl7Q9D+rHCCps= =QE1m -----END PGP SIGNATURE-----