From adfc78abd7143f120356d6fdb0a699bc6c07d10d Mon Sep 17 00:00:00 2001 From: ampchiu Date: Tue, 14 Feb 2023 11:59:58 +0800 Subject: [PATCH] MacOS: deprecated warnings when starting the app with dialog package --- cocoa/dlg.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cocoa/dlg.m b/cocoa/dlg.m index f29448e..91dc592 100644 --- a/cocoa/dlg.m +++ b/cocoa/dlg.m @@ -93,7 +93,8 @@ - (NSInteger)runPanel:(NSSavePanel*)panel { [panel setTitle:[[NSString alloc] initWithUTF8String:self->params->title]]; } if(self->params->numext > 0) { - [panel setAllowedFileTypes:[NSArray arrayWithObjects:(NSString**)self->params->exts count:self->params->numext]]; + [panel setAllowedContentTypes:[NSArray arrayWithObjects:(NSString**)self->params->exts count:self->params->numext]]; + } if(self->params->relaxext) { [panel setAllowsOtherFileTypes:YES]; @@ -133,4 +134,4 @@ - (DlgResult)load { return DLG_OK; } -@end \ No newline at end of file +@end