0

Is this possible, like when you call 'hide:' it calls 'applicationWillHide:'?

My application uses a variable amount of windows, depending on the amount of available screens, so it doesn't miniaturize those NSWindow instances when 'miniaturizeAll:' is called.

Fatso
  • 1,278
  • 16
  • 46

1 Answers1

1

NSWindowWillMiniaturizeNotification is one answer. It would be sent for each window. You could handle it with that.

You could also override: - (void)miniaturizeAll:(id)sender In an NSApplication category ( to avoid subclassing ) and call super if its ok to do so based on your conditions. Don't call super if you want to prevent it. ( but do notify users visually )

You might even set the menu item inactive when conditions match your needs, if you create a property you can bind it to.

uchuugaka
  • 12,679
  • 6
  • 37
  • 55
  • Oh a category is probably the way to go in my case, thank you very much uchuugaka. Nice answer! – Fatso Jul 18 '13 at 09:38