Vanilla windowWillClose_ question

Hi! I’m trying to make a vanilla window run a custom method before closing, in other words change its windowWillClose_ method. Is there a more correct way to do so than this? Creating a class and then ignoring it seems to be super awkward even though it sort of works. Any tips please?

from vanilla import FloatingWindow

    # create class
	class W (FloatingWindow):
		def windowWillClose_( self, notification ):
	# class already exist

w = W((100, 100, 200, 200))

Never mind! “Bind” is the proper way to do it.