Hey,
I'm trying to display an NSOpenPanel on a dispatch, with half-luck. The panel
displays, but no files going to be displayed - the circle just spinning on the
bottom-left corner. Anyone have an idea what going wrong?
Thanks,
Tamas
dispatch_async(dispatch_get_main_queue(), ^{
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
NSMutableArray *filetype = [NSMutableArray arrayWithCapacity:0];
[filetype insertObject:@"txt" atIndex:0];
[oPanel setAllowedFileTypes:filetype];
[oPanel setDirectoryURL:[NSURL URLWithString:NSHomeDirectory()]];
NSInteger returnCode = [oPanel runModal];
if (returnCode == NSOKButton) {
NSLog(@"OK!");
} else {
NSLog(@"Cancel!");
}
});
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]