Re: NSOpenPanel Exception/Bug
Re: NSOpenPanel Exception/Bug
- Subject: Re: NSOpenPanel Exception/Bug
- From: "Adam R. Maxwell" <email@hidden>
- Date: Wed, 29 Jul 2009 05:25:34 -0700
On Jul 28, 2009, at 11:24 PM, Kyle Sluder wrote:
On Jul 28, 2009, at 11:12 PM, Seth Willits <email@hidden>
wrote:
Yes. It just fires off a task.
Is there a particular reason you're doing this instead of using UTIs?
LaunchServices only look at certain tags to determine a UTI, and the
extension trumps everything else. There are numerous problems with
that, so I'd guess he's using /usr/bin/file to sniff content.
[task waitUntilExit];
Doing this while displaying an open panel might not be a good idea,
especially if it's waiting on the current runloop to fetch some
information. Like perhaps network volumes shown in the sidebar.
I think you're right on here (although I think it would still be an
NSOpenPanel bug). I'd try doing the equivalent of waitUntilExit using
a different runloop mode:
while ([task isRunning]) {
NSDate *date = [[NSDate alloc] initWithTimeIntervalSinceNow:0.1];
[[NSRunLoop currentRunLoop] runMode:@"SomePrivateMode" beforeDate:date
[date release];
}
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden