(hopefully!) simple newbie question
(hopefully!) simple newbie question
- Subject: (hopefully!) simple newbie question
- From: Mike Abdullah <email@hidden>
- Date: Wed, 11 Jan 2006 16:22:27 +0000
I am sure the answer to this is very simple, but I can't seem to find
anything in my Cocoa book, so here goes:
I have subclassed NSDocumentController in my app so that I can decide
whether or not to open a new document. If it is appropriate to open
a new Doc, my subclass of openUntitledDocumentOfType: display: does
the following:
return [super openUntitledDocumentOfType: docType display: YES];
However, I now need to call a particular method of the NSDocument
that this code returns, but I don't know how to "store" that
document. Basically I want to be able to do something like this:
newDoc = [super openUntitledDocumentOfType: docType display: YES];
[newDoc myMethod];
return newDoc;
So how do I actually do this? What I've written doesn't compile
because I haven'tdeclared newDoc. I tried doing:
id *newDoc
but this didn't work. Anyone?
Mike Abdullah.
_______________________________________________
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