Initialize text view in window with NSWindowController
Initialize text view in window with NSWindowController
- Subject: Initialize text view in window with NSWindowController
- From: email@hidden
- Date: Wed, 12 Jul 2006 11:05:56 +0200 (CEST)
- Importance: Normal
Hello all,
the main window in my app (created in MyDocument.nib) contains a text
view and is managed by a subclass
of NSWindowController (called MyWindowController). I did the following
things :
-declare "IBOutlet NSTextView *textView" in MyWindowController.h -set
that outlet to be the text view in the window (by control-dragging
in the nib)
-set the custom class of File's Owner to "MyWindowController" in
MyDocument.nib
-put that code MyWindowController.m :
@implementation MyWindowController
- (id)init {
self = [super initWithWindowNibName:@"MyDocument"];
[self setWindowFrameAutosaveName:@"MyDocWindow"];
return self;
}
(...)
Although I did all this, the "programmatic" textView (the "textView"
member of class
MyWindowController) is never initialized with the "visible,concrete" text
view in the nib:
it stays nil. So what did I forget to do ? i thought that making the
connection in the nib
would deal with that initialization.
Ewan
_______________________________________________
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