I have an app where I use NSOpenPanel:
openDlg = [NSOpenPanel openPanel];
[openDlg setCanChooseDirectories:YES];
[openDlg beginSheetModalForWindow:MainWindow completionHandler:nil];
if ([openDlg runModal] == NSOKButton){
NSLog(@"accept");
} else {
NSLog(@"cancel");
}
The thing is that after canceling, if I show the popup again it appears as a window, instead of sheet (which does on the first call). I think this is due to some release thing, but my project uses ARC, so I don't know. What I'm doing wrong? Thanks!