ToasterBox not working?

Hi All,

I was just trying to write a folder change alerter using ToasterBox to display the alerter, but for some reason the ToasterBoxes aren’t disappearing even when the the closingstyle is set to TB_ONCLICK. And when you Add or Delete a file from the folder that is being watched the first operation never gets a TB displayed too?

The folder change code is from Tim Golden http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/156178

I have also attached the code i have written so far.

result = win32event.WaitForSingleObject (change_handle, 500)

i have a feeling it is this line that is causing the TB’s not to disappear…

Cheers

watch.py (3.7 KB)

Bulkan-Savun Evcimen wrote:

Hi All,

I was just trying to write a folder change alerter using ToasterBox to display the alerter, but for some reason the ToasterBoxes aren't disappearing even when the the closingstyle is set to TB_ONCLICK. And when you Add or Delete a file from the folder that is being watched the first operation never gets a TB displayed too?

The folder change code is from Tim Golden http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/156178

I have also attached the code i have written so far.

result = win32event.WaitForSingleObject (change_handle, 500)

i have a feeling it is this line that is causing the TB's not to disappear....

You don't want to do things that prevent control from entering or returning to the MainLoop, as then no more wx events can be delivered. See http://wiki.wxpython.org/index.cgi/LongRunningTasks for alternatives.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!