onDeadListener

Dear all,
does enyone know how to avoid to send message to garbage collected listeners?

Should onDeadListener be set?

My code starts with:

from wx.lib.pubsub import setuparg1

from wx.lib.pubsub import pub

Thank you very much in advance!

Best.

Paolo

More specifically, as far as I get, by setting onDead parameter in the ListenerBase constructor I should be able manage the situation I’m facing.
I don’t know how to set this parameter in my python script.

Here the code for the 2.8 version, that it is the same on 3.X:

https://apt-browse.org/browse/ubuntu/trusty/universe/i386/python-wxgtk2.8/2.8.12.1+dfsg-2ubuntu2/file/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/lib/pubsub/core/listenerbase.py

Thank you very much.

Best.

Paolo

···

On Sunday, November 6, 2016 at 9:16:28 PM UTC+1, Paolo Zaffino wrote:

Dear all,
does enyone know how to avoid to send message to garbage collected listeners?

Should onDeadListener be set?

My code starts with:

from wx.lib.pubsub import setuparg1

from wx.lib.pubsub import pub

Thank you very much in advance!

Best.

Paolo

Deleted objects are automatically unsubscribed so you should not have to do anything. The code you have is in sufficient to give more detail. Post more code on the pypubsub forum (https://groups.google.com/forum/m/#!forum/pypubsub).

···

On Mon, Nov 7, 2016, 11:52 Paolo Zaffino zaffino.p@gmail.com wrote:

More specifically, as far as I get, by setting onDead parameter in the ListenerBase constructor I should be able manage the situation I’m facing.
I don’t know how to set this parameter in my python script.

Here the code for the 2.8 version, that it is the same on 3.X:

https://apt-browse.org/browse/ubuntu/trusty/universe/i386/python-wxgtk2.8/2.8.12.1+dfsg-2ubuntu2/file/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/lib/pubsub/core/listenerbase.py

Thank you very much.

Best.

Paolo

On Sunday, November 6, 2016 at 9:16:28 PM UTC+1, Paolo Zaffino wrote:

Dear all,
does enyone know how to avoid to send message to garbage collected listeners?

Should onDeadListener be set?

My code starts with:

from wx.lib.pubsub import setuparg1

from wx.lib.pubsub import pub

Thank you very much in advance!

Best.

Paolo

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Oliver