On Jul 28, 2009, at 11:24 PM, Kyle Sluder wrote:

On Jul 28, 2009, at 11:12 PM, Seth Willits <[email protected]> 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 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to