Skip to content

Commit 03fae3e

Browse files
committed
Update the Example code for some new constants.
1 parent 9ed92ec commit 03fae3e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Examples/DriveSample/DriveSampleWindowController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ - (void)showDownloadSavePanelExportingToPDF:(BOOL)isExportingToPDF {
242242
savePanel.nameFieldStringValue = suggestedName;
243243
[savePanel beginSheetModalForWindow:[self window]
244244
completionHandler:^(NSInteger result) {
245-
if (result == NSFileHandlingPanelOKButton) {
245+
if (result == NSModalResponseOK) {
246246
[self downloadFile:file
247247
isExportingToPDF:isExportingToPDF
248248
toDestinationURL:savePanel.URL];
@@ -345,7 +345,7 @@ - (IBAction)uploadFileClicked:(id)sender {
345345
[openPanel beginSheetModalForWindow:[self window]
346346
completionHandler:^(NSInteger result) {
347347
// Callback.
348-
if (result == NSFileHandlingPanelOKButton) {
348+
if (result == NSModalResponseOK) {
349349
// The user chose a file and clicked OK.
350350
//
351351
// Start uploading (deferred briefly since

Examples/StorageSample/StorageSampleWindowController.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ - (IBAction)downloadFileClicked:(id)sender {
183183
[savePanel beginSheetModalForWindow:self.window
184184
completionHandler:^(NSInteger result) {
185185
// Callback
186-
if (result == NSFileHandlingPanelOKButton) {
186+
if (result == NSModalResponseOK) {
187187
NSURL *destinationURL = [savePanel URL];
188188
GTLRStorageQuery_ObjectsGet *query =
189189
[GTLRStorageQuery_ObjectsGet queryForMediaWithBucket:storageObject.bucket
@@ -226,7 +226,7 @@ - (IBAction)downloadFileClicked:(id)sender {
226226
}
227227
}];
228228
}];
229-
} // result == NSFileHandlingPanelOKButton
229+
} // result == NSModalResponseOK
230230
}]; // beginSheetModalForWindow:
231231
}
232232

@@ -272,7 +272,7 @@ - (IBAction)uploadFileClicked:(id)sender {
272272
[openPanel beginSheetModalForWindow:self.window
273273
completionHandler:^(NSInteger result) {
274274
// Callback.
275-
if (result == NSFileHandlingPanelOKButton) {
275+
if (result == NSModalResponseOK) {
276276
// The user chose a file and clicked OK.
277277
//
278278
// Start uploading (deferred briefly since

Examples/YouTubeSample/YouTubeSampleWindowController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ - (IBAction)chooseFileClicked:(id)sender {
183183
[openPanel beginSheetModalForWindow:self.window
184184
completionHandler:^(NSInteger result) {
185185
// Callback
186-
if (result == NSFileHandlingPanelOKButton) {
186+
if (result == NSModalResponseOK) {
187187
// The user chose a file.
188188
NSString *path = openPanel.URL.path;
189189
self->_uploadPathField.stringValue = path;

0 commit comments

Comments
 (0)