Re: NSDrawer in System Pref Pane
Re: NSDrawer in System Pref Pane
- Subject: Re: NSDrawer in System Pref Pane
- From: "I. Savant" <email@hidden>
- Date: Thu, 11 May 2006 14:26:05 -0400
It's possible that this is a side-effect of trying to mess with a
window that doesn't really belong to you. The System Preferences
scenario is a bit of a special case. Your prefpane is a "guest" here.
At a guess, I would imagine that "mainViewDidLoad" doesn't
necessarily mean that the view's been added to the window yet. In
which case, [mainView window] would return nil. Have you tested (via
NSLog() or the debugger) to verify that you're getting a reference to
the window?
You may want to investigate NSView's -viewDidMoveToWindow and try
moving the code below to that method.
One final suggestion: Do without the drawer. Users don't expect
drawers to appear on the system preferences window. Why should your
prefpane be any different?
--
I.S.
On May 11, 2006, at 11:22 AM, Trygve Inda wrote:
I am trying to open a drawer attached to the System prefs pane
window.
In my nib is a drawer and NSView for the content. I have setup an
outlet in
my File's Owner (MyPrefPaneClass) previewDrawer.
I tried setting the parentWindow of the drawer to the PrefPane
window in my
nib but that didn't work so in mainViewDidLoad I tried
[previewDrawer setParentWindow:[[self mainView] window]];
A follow-up here...
[previewDrawer setParentWindow:[[self mainView] window]];
[previewDrawer open];
Does work, but only in response to a button click. It does not work in
mainViewDidLoad. How can I get the drawer to open upon opening my
pref pane?
Thanks,
Trygve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
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