Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Getting an NSWindow and setting its delegate



On 7/30/05, Martin Linklater <email@hidden> wrote:
> 1) Try to set the delegate of the default Window which is created
> when I create the project. Problem is, IB doesn't let me Control-drag
> from the window to my AppController class. I tried to set the windows
> delegete in code, but although I can see the 'setDelegate' method for
> NSWindow in the docs I don't know how to actually get a pointer to
> the window to begin with... How do you 'find' a pointer to the
> default NSWindow object that is created with the project ?

You have to drag from the window's icon in the instances tab, not from
the window itself.

If you want to have a pointer to something in a nib file so you can
manipulate it in code then that is what IBOutlets are for.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Newbie: Getting an NSWindow and setting its delegate (From: Martin Linklater <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.