Skip navigation.
 
mlRe: [basic] retain an NSTextView object and update a window
FROM : David Rio Vierra
DATE : Thu Jan 02 06:32:21 2003

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_removed>
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
ml[basic] retain an NSTextView object and update a window Jaime Magiera Jan 2, 05:57
mlRe: [basic] retain an NSTextView object and update a window David Rio Vierra Jan 2, 06:32
mlRe: [basic] retain an NSTextView object and update a window Jaime Magiera Jan 2, 10:29
mlRe: [basic] retain an NSTextView object and update a window David Rio Vierra Jan 2, 11:12
mlRe: [basic] retain an NSTextView object and update a window Jaime Magiera Jan 2, 16:37