Prior to installing Snow Leopard the following code worked with no problem, It runs a savePanel for exporting an rtf doc with the contents of a textVIew. Under 10.6 it still works. However the option to show/hide the output file extension stopped working. The savePanel checkbox toggles the visibility of the file extension in the output file name textField. However the output file displays the extension regardless of the state of the checkbox. Note: The NSSavePanel Class References states that setRequiredFileType has been depreciated in 10.6 and should be replaced with setAllowedFileTypes. I tried this with no luck. In fact it breaks exporting.
How can I edit my code to fix the show/hide file extension issue? thanks. -paul. -(IBAction)exportRTF:(id)sender { int index =[sender indexOfSelectedItem]; if (index==1){ NSSavePanel *panel = [NSSavePanel savePanel]; [panel setRequiredFileType:@"rtf"]; [panel setCanSelectHiddenExtension:YES]; [panel setTitle:NSLocalizedString(@"Export RTF Document", @"")]; [panel setNameFieldLabel:NSLocalizedString(@"Save As:", @"")]; if ([panel runModal] == NSOKButton) { [[notes RTFFromRange: NSMakeRange(0, [[mTextEditor string] length])] writeToFile:[panel filename] atomically:YES]; } } _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com