diff --git a/Examples/DriveSample/DriveSampleWindowController.m b/Examples/DriveSample/DriveSampleWindowController.m index 2376864a..dab888c0 100644 --- a/Examples/DriveSample/DriveSampleWindowController.m +++ b/Examples/DriveSample/DriveSampleWindowController.m @@ -242,7 +242,7 @@ - (void)showDownloadSavePanelExportingToPDF:(BOOL)isExportingToPDF { savePanel.nameFieldStringValue = suggestedName; [savePanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { - if (result == NSFileHandlingPanelOKButton) { + if (result == NSModalResponseOK) { [self downloadFile:file isExportingToPDF:isExportingToPDF toDestinationURL:savePanel.URL]; @@ -345,7 +345,7 @@ - (IBAction)uploadFileClicked:(id)sender { [openPanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { // Callback. - if (result == NSFileHandlingPanelOKButton) { + if (result == NSModalResponseOK) { // The user chose a file and clicked OK. // // Start uploading (deferred briefly since diff --git a/Examples/StorageSample/StorageSampleWindowController.m b/Examples/StorageSample/StorageSampleWindowController.m index 38a2b29b..bb3bff5a 100644 --- a/Examples/StorageSample/StorageSampleWindowController.m +++ b/Examples/StorageSample/StorageSampleWindowController.m @@ -183,7 +183,7 @@ - (IBAction)downloadFileClicked:(id)sender { [savePanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) { // Callback - if (result == NSFileHandlingPanelOKButton) { + if (result == NSModalResponseOK) { NSURL *destinationURL = [savePanel URL]; GTLRStorageQuery_ObjectsGet *query = [GTLRStorageQuery_ObjectsGet queryForMediaWithBucket:storageObject.bucket @@ -226,7 +226,7 @@ - (IBAction)downloadFileClicked:(id)sender { } }]; }]; - } // result == NSFileHandlingPanelOKButton + } // result == NSModalResponseOK }]; // beginSheetModalForWindow: } @@ -272,7 +272,7 @@ - (IBAction)uploadFileClicked:(id)sender { [openPanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) { // Callback. - if (result == NSFileHandlingPanelOKButton) { + if (result == NSModalResponseOK) { // The user chose a file and clicked OK. // // Start uploading (deferred briefly since diff --git a/Examples/YouTubeSample/YouTubeSampleWindowController.m b/Examples/YouTubeSample/YouTubeSampleWindowController.m index cbb77d43..bd0ef4d8 100644 --- a/Examples/YouTubeSample/YouTubeSampleWindowController.m +++ b/Examples/YouTubeSample/YouTubeSampleWindowController.m @@ -183,7 +183,7 @@ - (IBAction)chooseFileClicked:(id)sender { [openPanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) { // Callback - if (result == NSFileHandlingPanelOKButton) { + if (result == NSModalResponseOK) { // The user chose a file. NSString *path = openPanel.URL.path; self->_uploadPathField.stringValue = path;