Re: NSSavePanel problem
Re: NSSavePanel problem
- Subject: Re: NSSavePanel problem
- From: Quincey Morris <email@hidden>
- Date: Sun, 24 Feb 2013 10:14:00 -0800
On Feb 24, 2013, at 09:10 , Kyle Sluder <email@hidden> wrote:
> If that doesn't clear the problem, try launching your app with the Shift key held down (or turn on "Don't restore windows" in your Debug scheme's editor, or set the ApplePersistenceIgnoreState default to YES).
Good idea.
I'd also try using Apple menu -> "Recent Items" -> "Clear Menu".
I'd also try switching the panel mode between column view and list view, and navigating to a series of different folder without using the popup (and clicking Save for each one), to push older "recents" out of the popup.
> And if course, FILE A BUG! http://bugreport.apple.com. It could be that Apple knows about this issue already.
Yes, and attaching a crash dump might provide sufficient information to isolate the problem.
On Feb 24, 2013, at 01:26 , Peter Hudson <email@hidden> wrote:
> NSSavePanel *sp = [NSSavePanel savePanel];
> [sp setTitle:@"Save as HTML"];
> [sp setRequiredFileType:@"html"];
The last line of code is a bit suspect here.
'setRequiredFileType:' was deprecated in 10.6. You should be using 'setAllowedFileTypes:' instead. (If you target back to 10.5, you can use a run-time check to decide which method to use.)
More importantly, given that the crash occurs in code that appears to be deciding whether your app can open files with a certain extension, you could change this last line to specify a UTI for html content ('kUTTypeHTML') rather than an extension. UTIs are the *correct* solution.
_______________________________________________
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