• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDrawer in System Pref Pane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDrawer in System Pref Pane


  • Subject: Re: NSDrawer in System Pref Pane
  • From: Robert Walker <email@hidden>
  • Date: Thu, 11 May 2006 15:18:49 -0400

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?

As a long time Mac user (and as a developer) I agree, wholeheartedly, with this suggestion. This would be very annoying to me, and would prompt me to uninstall the preference pane immediately. If you have too much content to fit reasonably inside the preference pane consider other options. Like adding a tab view inside the preference pane, or even providing the configuration in a separate utility application (/Applications/Utilities would be a good place to install that).


On May 11, 2006, at 2:26 PM, I. Savant wrote:


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:
40mac.com


This email sent to email@hidden

-- Robert Walker 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


  • Follow-Ups:
    • Re: NSDrawer in System Pref Pane
      • From: Trygve Inda <email@hidden>
    • Re: NSDrawer in System Pref Pane
      • From: "I. Savant" <email@hidden>
References: 
 >Re: NSDrawer in System Pref Pane (From: Trygve Inda <email@hidden>)
 >Re: NSDrawer in System Pref Pane (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: NSRunLoop performSelector question
  • Next by Date: Re: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
  • Previous by thread: Re: NSDrawer in System Pref Pane
  • Next by thread: Re: NSDrawer in System Pref Pane
  • Index(es):
    • Date
    • Thread