シートの状態を判断する方法はありますか? 私はこのメソッドを呼び出すことができることを知っています:
- (void) customSheetDidClose : (NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
しかし、私がやりたいことは次のようなものです:
- (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];
}
私は自分のシートに NSPanel を使用しています。そのフレームを取得し、y の位置を確認してステータスを判断できると考えていましたが、これを行うための受け入れられた方法があるかどうかを確認したかったのです...