• 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
Sheets and NSPreferencePane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sheets and NSPreferencePane


  • Subject: Sheets and NSPreferencePane
  • From: Thomas Harrington <email@hidden>
  • Date: Fri, 19 Jul 2002 16:47:40 -0600

I'm trying to load a sheet from an NSPreferencePane subclass-- something like the result of the "Software Update" pref pane's "Show Log..." button. In the pref pane class I have the following:

[NSApp beginSheet:configurePanel
modalForWindow:[[self mainView] window]
modalDelegate:self
didEndSelector:@selector(configureSheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];

In this call, "configurePanel" is an NSPanel subclass that I can verify has been loaded from its nib already (e.g. by experimentally replacing this snippet with a call to tell it to makeKeyAndOrderFront).

I keep getting run-time errors saying "Modal session requires modal window". Since this action was triggered by a control in the pref pane's NSView, and since [self mainView] returns that view, I don't *think* I'm passing a bogus reference here, but obviously I'm missing something.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Sheets and NSPreferencePane
      • From: Thomas Harrington <email@hidden>
  • Prev by Date: use TIFF or PNG for icons?
  • Next by Date: Crashing Subclass
  • Previous by thread: Re: use TIFF or PNG for icons?
  • Next by thread: Re: Sheets and NSPreferencePane
  • Index(es):
    • Date
    • Thread