• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOpenPanel Exception/Bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSOpenPanel Exception/Bug (From: Seth Willits <email@hidden>)
 >Re: NSOpenPanel Exception/Bug (From: Andy Lee <email@hidden>)
 >Re: NSOpenPanel Exception/Bug (From: Seth Willits <email@hidden>)
 >Re: NSOpenPanel Exception/Bug (From: Kyle Sluder <email@hidden>)

  • Prev by Date: NSArrayController and avoidsEmptySelection
  • Next by Date: Re: NSArrayController and avoidsEmptySelection
  • Previous by thread: Re: NSOpenPanel Exception/Bug
  • Next by thread: Re: NSOpenPanel Exception/Bug
  • Index(es):
    • Date
    • Thread