Re: NSSavePanel: Hide extension is killing the extension
Re: NSSavePanel: Hide extension is killing the extension
- Subject: Re: NSSavePanel: Hide extension is killing the extension
- From: Eric Brunstad <email@hidden>
- Date: Fri, 10 Jun 2005 17:17:30 -0400
Hi,On Jun 10, 2005, at 10:03 AM, Theodore H. Smith wrote:
I've found something strange with the NSSavePanel. I've never used NSSavePanel before, mind you.
I open up a panel like this:
[sp setCanSelectHiddenExtension:true]; runResult = [sp runModalForDirectory:nil file: @"untitled.htm" ];
I click the "hide extension" checkbox in the save panel and the extension gets hidden. Then I uncheck the "hide extension" checkbox, and the extension stays hidden. In fact it appears to have been deleted.
What am I doing wrong? Or is this a bug in Cocoa?
What you are doing is wrong.
Do this instead:
[sp setAllowedFileTypes:[NSArray arrayWithObjects:@"htm",@"html"]]; [sp setCanSelectHiddenExtension:YES]; runResult = [sp runModalForDirectory:nil file:@"untitled.htm"];
The reason why you must do this is becuase Cocoa must know what extension to slap on the name when the checkbox is selected.
Eric Brunstad Mind Sprockets Software www.mindsprockets.com |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden