Re: wx.Dialog not reported as destroyed after '.Destroy()' is called
Jasper Elzinga | Alexion Software <[email protected]> Thu, 6 Jun 2019 05:19:30 -0700 (PDT)
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_306_362217063.1559823570955 Content-Type: text/plain; charset="UTF-8" Thanks! This works. However.. returning to the mainloop is not possible in our actual use case. We have a global dialog manager, and the code behind our button asks it for a dialog in a loop. The dialog manager has to know wether or not a dialog can be reused: if it's destroyed it can't be reused, but if it's for example hidden it can. This check currently fails. We can't allow the program to be accessable while the loop is running, thats why we use ShowModal and why wx.CallAfter is not possible (or at least i dont know how it would be possible using it). Any suggestions? Perhaps there is a way to simulate an idle event? This way we can remain in our loop. Ofcourse we can always do our own "destroyed" management with a 'self.destroyed' variable thats set to True by the 'Destroy' method in our dialog, but this feels wrong to me :) Thanks, Jasper -- ______digitale bijlage______ De informatie verzonden met dit E-mail bericht is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is niet toegestaan, evenals openbaarmaking, vermenigvuldiging en/of verstrekking aan derden. Alexion Software is niet aansprakelijk voor de juiste en volledige overbrenging van de inhoud van verzonden e-mail berichten, noch voor een tijdige ontvangst daarvan. De aan u verzonden digitale informatie mag uitsluitend gebruikt worden voor het desbetreffende project. De aan u verzonden digitale informatie wordt zonder enige verantwoordelijkheid onzerzijds verstrekt. Aan de door u digitaal ontvangen informatie kunnen geen rechten worden ontleend ten opzichte van Alexion Software. Het is raadzaam om de ontvangen bestanden voor het gebruik te controleren op eventuele aanwezigheid van virussen. Verlies van gegevens door het niet maken van back-ups is niet voor verantwoordelijkheid van Alexion Software. Op al onze offertes en facturen zijn van toepassing Algemene Voorwaarden zoals gedeponeerd bij de KvK Midden-Nederland onder nummer 30174840 van ICT~Office. Deze zullen wij u op uw eerste verzoek kosteloos toesturen. Een kopie van deze algemene voorwaarden vindt u op alexion.nl/algemene-voorwaarden <http://alexion.nl/algemene-voorwaarden> -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxPython-dev/bdf85d60-7f6b-4717-8e63-0c103f327110%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_306_362217063.1559823570955 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks! This works.<br><br>However.. returning to the main= loop is not possible in our actual use case. We have a global dialog manage= r, and the code behind our button asks it for a dialog in a loop. The dialo= g manager has to know wether or not a dialog can be reused: if it's des= troyed it can't be reused, but if it's for example hidden it can. T= his check currently fails. We can't allow the program to be accessable = while the loop is running, thats why we use ShowModal and why wx.CallAfter = is not possible (or at least i dont know how it would be possible using it)= .<br><br>Any suggestions? Perhaps there is a way to simulate an idle event?= This way we can remain in our loop.<br><br>Ofcourse we can always do our o= wn "destroyed" management with a 'self.destroyed' variabl= e thats set to True by the 'Destroy' method in our dialog, but this= feels wrong to me :)<br><br>Thanks,<br>Jasper</div> <br> <p><font size=3D"1" style=3D"background-color:white" face=3D"Verdana" color= =3D"#808080">______digitale bijlage______</font></p><p><font size=3D"1" fac= e=3D"Verdana" color=3D"#808080" style=3D"background-color:white">De informa= tie verzonden met dit E-mail bericht is uitsluitend bestemd voor de geadres= seerde. Gebruik van deze informatie door anderen dan de geadresseerde is ni= et toegestaan, evenals openbaarmaking, vermenigvuldiging en/of verstrekking= aan derden. Alexion Software is niet aansprakelijk voor de juiste en volle= dige overbrenging van de inhoud van verzonden e-mail berichten, noch voor e= en tijdige ontvangst daarvan. De aan u verzonden digitale informatie mag ui= tsluitend gebruikt worden voor het desbetreffende project. De aan u verzond= en digitale informatie wordt zonder enige verantwoordelijkheid onzerzijds v= erstrekt. Aan de door u digitaal ontvangen informatie kunnen geen rechten w= orden ontleend ten opzichte van Alexion Software. Het is raadzaam om de ont= vangen bestanden voor het gebruik te controleren op eventuele aanwezigheid = van virussen. Verlies van gegevens door het niet maken van back-ups is niet= voor verantwoordelijkheid van Alexion Software.</font></p><p><font size=3D= "1" style=3D"background-color:white" face=3D"Verdana" color=3D"#808080">Op = al onze offertes en facturen zijn van toepassing Algemene Voorwaarden zoals= gedeponeerd bij de KvK Midden-Nederland onder nummer 30174840 van ICT~Offi= ce. Deze zullen wij u op uw eerste verzoek kosteloos toesturen. Een kopie v= an deze algemene voorwaarden vindt u op <a href=3D"http://alexion.nl/algeme= ne-voorwaarden" target=3D"_blank">alexion.nl/algemene-<wbr>voorwaarden</a><= /font></p> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;wxPython-dev" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">wxPyth= [email protected]</a>.<br /> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/wxPython-dev/bdf85d60-7f6b-4717-8e63-0c103f327110%40googlegroups= .com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/ms= gid/wxPython-dev/bdf85d60-7f6b-4717-8e63-0c103f327110%40googlegroups.com</a= >.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> ------=_Part_306_362217063.1559823570955--