Re: Cocoa newbie question
Re: Cocoa newbie question
- Subject: Re: Cocoa newbie question
- From: Totte Alm <email@hidden>
- Date: Fri, 23 May 2003 12:40:35 +0200
torsdagen den 22 maj 2003 kl 21.00 skrev Greg Casey:
I created my own NSDocumentController subclass and overloaded the
"newDocument:" and "makeUntitledDocumentOfType:" methods. If you
choose to go this route, you'll need to create an instance of your
NSDocumentController in the MainMenu.nib (or whatever you call your
main nib file) so that it gets loaded before the default
NSDocumentController.
Thanks again.
One short "follow up" question. Now this works as expected except for
one item, the Click-In-Dock 'rapp' event that calls down from
NSApplication _doOpenUntitled -> NSDocumentController
openUntitledDocumentOfType -> my implementation of
makeUntitledDocumentOfType.
Here I can check if I do have the Assistant visible (meaning I did fire
this new doc from the Assistant), or not, which means I should show the
assistant, and return nill I guess, but then I get an ugly alert
saying /New/ cant create document. Any hints on how to avoid this?
Should I subclass NSApplication and trap that event on that level, or
is there another more elegant Cocoa solution?
// Totte
------------------------------------------------------------------------
-----------------------
The intelligence on the planet is constant,
it's just the population that is growing.
_______________________________________________
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.