• 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
Overriding NSDocumentController problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overriding NSDocumentController problem


  • Subject: Overriding NSDocumentController problem
  • From: Gerben Wierda <email@hidden>
  • Date: Mon, 25 Feb 2002 17:19:40 +0100

I am trying to override the NSDocumentController's newDocument behaviour.

What does not work is subclassing NSDocumentController to take over the behaviour of newDocument. I have created a subclass of NSDocumentController and in that class have added a method newDocument as in NSDocumentController. That method at this point only gives a NSLog message and does not call the same method in the superclass.

Now, I know that the app's delegate applicationWillFinishLaunching is called and in that method I create an instance of my own DocumentController.

So, now I expect that when I hit New in the menu, my subclass' newDocument is called. But it isn't and I do not understand why not. I do not get my NSLog message and I do get a new window and a new document (and I should not).

Does anyone know what I am doing wrong?

G
_______________________________________________
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: Overriding NSDocumentController problem
      • From: Gerben Wierda <email@hidden>
  • Prev by Date: NSTabview and IB and application Crash
  • Next by Date: Re: Document based application with that auto-new-doc behaviour
  • Previous by thread: NSTabview and IB and application Crash
  • Next by thread: Re: Overriding NSDocumentController problem
  • Index(es):
    • Date
    • Thread