Re: [basic] retain an NSTextView object and update a window
Re: [basic] retain an NSTextView object and update a window
- Subject: Re: [basic] retain an NSTextView object and update a window
- From: David Rio Vierra <email@hidden>
- Date: Wed, 1 Jan 2003 19:32:21 -1000
The second time, you're probably calling those methods on some other
instance of aWindowController. The object you created in Interface
Builder, represented by that blue cube, is one instance of it, and it
is the one with a connection to the NSTextView. If you want other
objects to use that same instance of aWindowController, you'll have to
connect them in IB using an IBOutlet in the other objects..
You generally don't need to retain any user interface elements, other
than windows that will never be used again once closed. .
- Rio
On Wednesday, January 1, 2003, at 06:57 PM, Jaime Magiera wrote:
Let's say I have a window with an NSTextView. The class
aWindowController.m is the window's delegate. That delegate defines
methods to display text in the textView. Now, when I call these
methods from within the controller class, everything works as
expected. However, if I try to call the the same methods from outside
the class, it won't work on the window. Presumably, because I'm not
acting upon the NSTextView instance of the currently open window. I
need to do an object retain, correct? I've read some Apple docs and
Learning Cocoa but I think I need a bit of help doing this right.
Any pointers to more good docs/examples on the topic?
Jaime
_______________________________________________
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.
_______________________________________________
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.