Re: custom window controllers
Re: custom window controllers
- Subject: Re: custom window controllers
- From: Chris Giordano <email@hidden>
- Date: Thu, 19 Sep 2002 13:27:25 -0400
Donald,
If all you want to do is change the name of the document that is
displayed in the document window, I believe that you can just override
NSDocument's displayName method.
I have a document based application that has the following definition in
my NSDocument subclass:
- (NSString *) displayName
{
NSString * s = [theAccount getAccountName];
if (s && [s length] > 0)
return s;
return [super displayName];
}
This seems to do the trick for me -- no custom window controller needed.
If you need the custom controller for other things, then....
chris
On Thursday, September 19, 2002, at 02:40 AM, Donald S. Hall wrote:
Does anyone have a sample code snippet for installing a custom window
controller for a document? I want to modify the document window title,
and
this seems to be the way to do it. I have read over the documentation
and
see the methods I need to work with. I must override
-makeWindowControllers
in my NSDocument subclass to create my custom window controller. Do I
need
to send [self makeWindowControllers] somewhere? (Where?) Also, it
says I
must send the -addWindowController message to add my controller to the
document's list of controllers. Again, where should I do this? In
-init? In
-makeWindowControllers?
Thanks for any help,
Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
http://www.theboss.net/appsmore
email@hidden
_______________________________________________
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.