3

I'm designing a preferences window and I want it to act similarly to the ones on OS X's default programs - only one preferences window can be open at a time, and any attempts to open another one redirect the focus to the current prefs. window.

I realise I could make it modal but I want to know the best ways to handle a problem like this.

PKBeam
  • 159
  • 6
  • Are you using a storyboard in your project? – rob mayoff Jun 25 '16 at 06:22
  • It'll take just one bool variable and a window-close notification to achieve that goal. – El Tomato Jun 25 '16 at 11:07
  • If you are using storyboards, see [OS X storyboards: using “show” segue without allowing duplicate new windows to show?](http://stackoverflow.com/questions/36096257/os-x-storyboards-using-show-segue-without-allowing-duplicate-new-windows-to-s/36104388#36104388) – Jon Jun 25 '16 at 22:39

0 Answers0