Re: Getting true parent window of views in drawers
Re: Getting true parent window of views in drawers
- Subject: Re: Getting true parent window of views in drawers
- From: Greg Herlihy <email@hidden>
- Date: Thu, 09 Mar 2006 20:25:06 -0800
- Thread-topic: Getting true parent window of views in drawers
There is no such class as an "NSDrawerWindow". There is an NSDrawer class
that implements the drawer's window - a class which is fully documented in
both the AppKit reference and in the "Drawers" programming guide.
Since both NSWindow and NSDrawer implement parentWindow, the application
should call parentWindow and not rely on the _parentWindow instance
variable, in order to find the parent window - if the window (or drawer) has
one.
Greg
On 3/9/06 12:35 PM, "Mike Abdullah" <email@hidden> wrote:
> In my app I have an custom NSControl in my app. I want to register
> it to receive notifications from it's window. However, if the
> control is inside a drawer, it considers its window to be an instance
> of NSDrawerWindow.
>
> This class is private, so there is no documentation. If I call
> parentWindow of it, I get NULL. However, I can call _parentWindow to
> get the true parent window of the control. Of course this is a
> private method, so seems a little dodgy to me.
>
> Can anyone suggest either:
>
> A. A better way of doing this?
>
> OR
>
> B. How to stop the compiler warning me about calling _parentWindow?
>
> Mike A.
> _______________________________________________
> 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
_______________________________________________
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