Closing Color Well Panel when Preferences closes


#1

I’m not sure if this question is answered later in the book, but is there a way to close the color selector panel automatically when the preferences panel is closed? I’m guessing it would involve overriding the preference panel’s close method so that it call’s the colorWell’s panel’s close method as well. Can this be done from PreferenceController or do I have to create a custom panel?


#2

Never mind, I figured it out! I made PreferenceController the delegate of its window and used the delegate “windowWillClose” method with NSColorPanel’s “orderOut” method to close the colour well panel.