Subclassing NSWindowController
Subclassing NSWindowController
- Subject: Subclassing NSWindowController
- From: Chaffinch <email@hidden>
- Date: Thu, 5 Dec 2002 10:16:52 +0000 (GMT)
Hi,
I am writing a text editor as a way of learning Cocoa. I want to customise
the window title to display the full path name. I have managed to implement
this by subclassing NSWindowController and overriding the
windowTitleForDocumentDisplayName method. So far so good. I have also
overridden MyDocument's makeWindowControllers method to create the window
controller and call addWindowController. So far so good.
Only now, opening or saving a document no longer works??
I have read through the Apple docs, and have made the NSTextView member
(previously owned by the document) a member of the subclassed
NSWindowController. And overridden windowDidLoad in an attempt to load the
document.
Am I correct in thinking that I still need the loadDataRepresentation and
dataRepresentaionOfType methods in the document class to load and save the
document but that the actual displaying is now done by the windo controller?
Have I missed something?
I have looked on stepwise, cocoadevcentral, apple etc for an example of
subclassing NSWindowController but come up blank. Anyone know of one?
The closest I came was on oreilly.com, ImageApp does this, so I have got some
ideas from there but still no success. One thing hey suggest is to change the
File's Owner in Interface Builder, but following the instructions does not
work on my version. I am guessing that the tutorial was written for an
earlier version of the dev tools. I am using OSX 10.2.2.
Any ideas.
Thanks very much for your time.
=====
Regards
Chaffinch
----------------------------------------------
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
_______________________________________________
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.