Skip to content

Commit

Permalink
Update the Example code for some new constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvl committed Sep 26, 2024
1 parent 9ed92ec commit 03fae3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Examples/DriveSample/DriveSampleWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Examples/StorageSample/StorageSampleWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -226,7 +226,7 @@ - (IBAction)downloadFileClicked:(id)sender {
}
}];
}];
} // result == NSFileHandlingPanelOKButton
} // result == NSModalResponseOK
}]; // beginSheetModalForWindow:
}

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Examples/YouTubeSample/YouTubeSampleWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03fae3e

Please sign in to comment.