• 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
Re: NSDocument-based app limitations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument-based app limitations?


  • Subject: Re: NSDocument-based app limitations?
  • From: Matthew Formica <email@hidden>
  • Date: Tue, 30 Mar 2004 12:46:26 -0800

Hrm.... I don't think you'd have to by-pass the whole NSDocument
architecture to do what you want. Since the filetypes pop-up that shows up
in the save dialog is in the accessory view, and the accessory view can be
completely customized or replaced (see -prepareSavePanel: and
-shouldRunSavePanelWithAccessoryView) I would try swapping in your own
accessory view that presents a pop-up button with a customized list of
types, and call -setFileType: as needed in response to selections. A bit
messy, like you say, but better than building your own custom document
architecture.

I haven't tried it myself, but it seems like it should work.

Regards,

--

Matthew Formica
Cocoa & Dev Tools Technology Evangelist
Apple Worldwide Developer Relations
email@hidden

******************************************************************
The Platform. The People. The Possibilities.

Connect at Worldwide Developers Conference 2004
June 28-July 2, San Francisco

Visit http://developer.apple.com/wwdc
******************************************************************


On 3/29/04 11:46 PM, "Mark Munz" <email@hidden> wrote:

>
> I see not being able to dynamically manipulate the list of filetypes as
> a weakness. TextEdit gets around this by doing everything by hand.
>
> Sketch shows how to use a document model, but again it's very simple
> (one document type -- no dynamic changes to the type of document).
>
>>> So I'll rephrase my main question. Can I dynamically change the
>>> filetypes that show up in the save dialog? Do I hack in and muck with
>>> the UI elements (doesn't seem the "right way" -- but maybe that's the
>>> way everyone does it)? Or do I have to by-pass the whole NSDocument
>>> code completely and do it myself (like TextEdit does)?
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSDocument-based app limitations?
      • From: Mark Munz <email@hidden>
References: 
 >Re: NSDocument-based app limitations? (From: Mark Munz <email@hidden>)

  • Prev by Date: Re: [OT] Retain count riddle
  • Next by Date: creating local Log File in /Library/Logs...
  • Previous by thread: Re: NSDocument-based app limitations?
  • Next by thread: Re: NSDocument-based app limitations?
  • Index(es):
    • Date
    • Thread