NSFontPanel as Sheet problem
NSFontPanel as Sheet problem
- Subject: NSFontPanel as Sheet problem
- From: Todd Freese <email@hidden>
- Date: Tue, 18 Oct 2005 23:46:34 -0500
I am trying to open an NSFontPanel in a sheet for a Doc-based
application. Here is my code:
NSFontManager *fontManager = [NSFontManager sharedFontManager];
NSFontPanel *fontPanel = [fontManager fontPanel:YES];
[fontPanel setWorksWhenModal:YES];
[NSApp beginSheet:[[fontPanel windowController] window]
modalForWindow:[self window] modalDelegate:self
didEndSelector:@selector(fontPanelClosed:) contextInfo:self];
[fontManager orderFrontFontPanel:self];
When this runs, I get the follow errors:
2005-10-18 23:45:11.888 Still_Store[6980] *** Assertion failure in -
[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndS
elector:contextInfo:], AppKit.subproj/NSApplication.m:3037
2005-10-18 23:45:11.893 Still_Store[6980] Modal session requires
modal window
Any ideas what I am doing wrong?
Thanks,
Todd Freese
_______________________________________________
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