I have following code which works fine, however when I updated to Lion I started getting warnings that this method has been deprecated and suggests that I use “beginSheetModalforWindow”. How would you translate the following to code to use that?
[savePanel beginSheetForDirectory: NULL
file: fileName
modalForWindow: mWindow
modalDelegate: self
didEndSelector: @selector(savePanelDidEnd:returnCode:contextInfo:)
contextInfo: NULL];
It’s actually
beginSheetModalForWindow:completionHandler:, and you’d do something like this: