NSSavePanel's required/allowed types
NSSavePanel's required/allowed types
- Subject: NSSavePanel's required/allowed types
- From: "Jonas S" <email@hidden>
- Date: Wed, 3 Oct 2007 20:14:59 +0300
Hello,
I have searched archive but could not find exactly what I want.
I have a NSSavePanel in my program for saving images. It has an accessory
view with NSPopUpButton to choose image type (similar to Apple Preview). And
I want to implement exactly the same behaviour like Preview does: when popup
selection is changed, required-allowed files types (extension) for panel
must be changed.
Using setAllowedFileTypes, setAllowsOtherFileTypes, setRequiredFileType
combinations works fine, except in this situation: lets say currently file
name is myImage.tiff and popup shows "TIFF". I rename file to
MyImage.jpgand change popup to JPEG. File name is converted into
MyImage.jpg.jpg.
The question is - how to avoid extra extension in specified situation?
Preview does not have such a problem.
By the way, when using TIFF and JPEG allowed types should be tiff, tif and
jpeg, jpg. If type would be only one (for example png) then only
setRequiredFileType is needed to call and that's all. But more than one type
causes mentioned problems.
Any help would be very appreciate.
p.s. sorry for my poor English.
Jonas S.
_______________________________________________
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