Re: Newb: Targeting an instance of a class instantiated by a NIB file
Re: Newb: Targeting an instance of a class instantiated by a NIB file
- Subject: Re: Newb: Targeting an instance of a class instantiated by a NIB file
- From: Bill Bumgarner <email@hidden>
- Date: Fri, 12 Sep 2008 21:05:58 -0700
On Sep 12, 2008, at 8:24 PM, Brad Gibbs wrote:
OK.... XCode doesn't put up any errors or any warnings for this
code and the app works as intended. The code is in an
NSViewController, so I was targeting the view controller's view and
then the view's window. What is the correct approach?
I was referring explicitly to the '[self.view.window]' sub-
expression. That isn't valid. I'm not even sure why it compiles,
frankly.
If you were trying to pass the window to -removeChildWindow:, it'd
look something like:
[self.view.window.parentWindow.windowController removeChildWindow:
self.view.window];
On Sep 12, 2008, at 7:09 PM, Bill Bumgarner wrote:
On Sep 12, 2008, at 7:08 PM, Brad Gibbs wrote:
[self.view.window.parentWindow.windowController removeChildWindow:
[self.view.window]];
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden