
Window
Controllers
Saving and Restoring Data 9 503
Objective-C:
- (NSString *)windowNibName {
return @"MyDocument" ;
}
If you have any initialization to do (such as setting fields in
the view of your document), you do it in an override of win-
dowControllerDidLoadNib.
In Diary, the
loadFields-
FromDiaryData
method is called. In the examples, in-line
code sets the fields in many cases.
You almost always override this method. Even if you start off
by not doing so, you should put an override in because you
will probably need it as your project grows.
Java:
public void windowControllerDidLoadNib
(NSWindowController aController) {