Sheets and NSPreferencePane
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.