Re: NSPreferencePane and sheets
Re: NSPreferencePane and sheets
- Subject: Re: NSPreferencePane and sheets
- From: Dave DeLong <email@hidden>
- Date: Fri, 09 Jul 2010 17:41:05 -0600
Here's some clarification (since I realize my original question may not have made very much sense):
I have a button on an NSPreferencePane that executes the following code:
NSOpenPanel * open = [NSOpenPanel openPanel];
//basic configuration
[NSApp beginSheet:open modalForWindow:[[self mainView] window] delegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
When I click the button to execute this code, I get a sheet that looks like this:
http://gallery.me.com/davedelong#100084/Screen shot 2010-07-09 at 5.34.22 PM&bgcolor=black
You'll notice that everything is collapsed at the the file browser area is blank. When I try to navigate to a part of the file system within the panel, nothing shows up in the browser area. For example:
http://gallery.me.com/davedelong#100084/Screen shot 2010-07-09 at 5.34.37 PM&bgcolor=black
- When I click the "OK" or "Cancel" button, the sheet disappears, but the didEndSelector (as specified above) is never executed.
- When I click the original button again (to re-open the sheet), the button's action executes (verifiable via logging, breakpoints, etc), but the sheet never opens.
- If I change the NSOpenPanel to display as a modal window (-[NSOpenPanel runModal]) instead of as a sheet, everything works as expected.
Summary: something is wrong with my sheet when I use it from within an NSPreferencePane.
Question: what's going on, and how do I fix it?
Thanks,
Dave
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden