• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSSavePanel's required/allowed types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSSavePanel's required/allowed types
      • From: Apparao <email@hidden>
  • Prev by Date: Re: NSCell subclass editing
  • Next by Date: Re: Should I be trying to use bindings for this?
  • Previous by thread: Re: Bound table not getting sorted when cell content is modified
  • Next by thread: Re: NSSavePanel's required/allowed types
  • Index(es):
    • Date
    • Thread