• 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
Open/Save into packages?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Open/Save into packages?


  • Subject: Open/Save into packages?
  • From: Nicholas Shanks <email@hidden>
  • Date: Fri, 15 Feb 2002 20:44:22 +0000

What's the cheapest way to call NSSavePanel's setTreatsFilePackagesAsDirectories: method?
I always want to pass the value YES, and *really* want to avoid re-writing any NSDocument or NSDocumentController methods. The default ones are great!
Overriding them and calling

[[NSSavePanel savePanel] setTreatsFilePackagesAsDirectories:YES];
[super openDocument:sender];

for example doesn't work, because of course super calls [NSSavePanel savePanel] too, which resets the parameters.
I was thinking that subclassing NSSavePanel and overriding +savePanel would work, if (despite being warned against the method) my subclass posed as NSSavePanel.
I want application-wide functionality for both open and save, so this would not be a problem. Can anybody suggest alternatives?

Nicholas Shanks
--

http://nickshanks.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: what's an NSZone?
  • Next by Date: Re: Double call of awakeFromNib on custom view
  • Previous by thread: Re: what's an NSZone?
  • Next by thread: Re: Open/Save into packages?
  • Index(es):
    • Date
    • Thread