8

I'm writing a Cocoa app and basically I have a window and I need to check if a sheet is open before I open another window. Google doesn't seem to know that one. How may I check if the sheet is open or not?

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
Fernando Valente
  • 1,096
  • 1
  • 8
  • 30

1 Answers1

17

-[NSWindow attachedSheet]

BOOL hasSheet = ([window attachedSheet] != nil);
jscs
  • 63,694
  • 13
  • 151
  • 195