• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Initialize text view in window with NSWindowController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: drawing arrows
  • Next by Date: RE: Mixing Object Types in a NSDictionary
  • Previous by thread: Re: [temporary workaround] NSDocument with NSMatrix crasher (10.4)
  • Next by thread: Helper tool, root and MoreAuthSample?
  • Index(es):
    • Date
    • Thread