If it's a modal dialog, you could check for its return value.

r = panel.showModalDialog()

# When the panel is destroyed, r should be either True (OK), False (Cancel),
or None (panel was closed)


What kind of cleanup do you need to do? If it's variables/objects that have
been created while the panel was open, you could always create variables
inside the panel instance (self.whatever), so they will be automatically
deleted when the panel instance is destroyed.


Hope that helps.

Ivan


On Wed, Oct 26, 2011 at 6:07 AM, AcidDrippa <
[email protected]> wrote:

> **
> Hi all
>
> Is there any callbacks or any way I can capture a dialog close event? I
> needed to perform some cleanup operations when the user closes a dialog
> using the 'x' button of the dialog.
>
> Or am I doing it wrong and there is an alternative?
>
> Thanks
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to