• 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
[Solved] Custom file filter interferes with modal window (Was: Modal dialog weirdness)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Solved] Custom file filter interferes with modal window (Was: Modal dialog weirdness)


  • Subject: [Solved] Custom file filter interferes with modal window (Was: Modal dialog weirdness)
  • From: Derrick Bass <email@hidden>
  • Date: Mon, 21 Nov 2005 19:57:52 -0800
  • Resent-date: Mon, 21 Nov 2005 21:35:47 -0800
  • Resent-from: Derrick Bass <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: email@hidden

On Nov 20, 2005, at 2:34 PM, Derrick Bass wrote:


Okay, so that brings up a new question. The reason QTKitAdvancedDocument does this is because it wants a custom panel:shouldShowFilename filter (to display all types that QuickTime can open) and the way it does this is by implementing openDocument: and attaching self as the delegate of the save panel. So, how can I get a custom filter without doing that? Do I need to subclass NSDocumentController?


Well, that's what I did. Turned out to be very easy. I created a subclass of NSDocumentController and moved the following three methods from the application's delegate into it:
- (id)openDocumentWithContentsOfFile: display:
- (BOOL)panel: shouldShowFilename:
- (void)openDocument:


Now my app can open all the types that QuickTime can open, but doesn't respond to "Open…" when there's a modal window in front. Yay!

Derrick


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Strange Retain Count?
  • Next by Date: Custom NSCell bindings through NSTableColumn
  • Previous by thread: Re: Strange Retain Count?
  • Next by thread: Custom NSCell bindings through NSTableColumn
  • Index(es):
    • Date
    • Thread