Is there a way to determine the state of a sheet? I know I can call this method:
- (void) customSheetDidClose : (NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
but what I want to do is something like this:
- (void) getInfoMethod {
//...do a lot of stuff to gather data
[self openSheetMethod:dictionaryFullOfStuff];
//I am completely making this up
while([panFileDataEditor state] == open) {
//do nothing
}
}
- (void) openSheetMethod : (NSDictionary*) stuff {
//...do something with stuff
[NSApp beginSheet: panFileDataEditor modalForWindow: window modalDelegate: self didEndSelector: @selector(customSheetDidClose:returnCode:contextInfo:) contextInfo: nil];
}
I'm using a NSPanel for my sheet, I was thinking I could get its frame and check the y location to determine its status but I wanted to check to see if there was an accepted way of doing this...