NSFontPanel for a modal window
NSFontPanel for a modal window
- Subject: NSFontPanel for a modal window
- From: Kurt Sutter <email@hidden>
- Date: Sat, 13 Jun 2015 07:08:28 +0200
I have a modal window (run with [NSApp runModalForWindow:]) that sports a view that is a descendant of NSTextView. The view has key focus and text is selected therein. I then bring up the font panel calling [NSFontPanel sharedFontPanel]
The font panel comes up, and does not have key focus. When I now click a new font in the font panel, nothing happens, changeFont: of my view is not called. Only when I make the font panel the key window, operations in the font panel send a changeFont: message to my view. This is, however, not standard behavior (see e.g. TextEdit) where the key focus remains with the text window and you still can click a new font in the font panel to change the text in the text window.
I have tried setting delegate of NSFontManager and/or of the font panel, and also the target of the font panel, all to non avail.
When I show my window in non-modal mode, things work as expected, but that is not an option for the time being.
Any advice is appreciated
Kurt
_______________________________________________
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