Re: NSSavePanel's required/allowed types
Re: NSSavePanel's required/allowed types
- Subject: Re: NSSavePanel's required/allowed types
- From: Apparao <email@hidden>
- Date: Thu, 4 Oct 2007 11:49:51 +0530
How about - (BOOL)panel:(id)sender isValidFilename:(NSString *)
filename Panel delegate method?
- Apparao.
On Oct 3, 2007, at 10:44 PM, Jonas S wrote:
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:
40effigent.net
This email sent to email@hidden
_______________________________________________
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