Re: NSFontPanel for a modal window
Re: NSFontPanel for a modal window
- Subject: Re: NSFontPanel for a modal window
- From: Kurt Sutter <email@hidden>
- Date: Sun, 14 Jun 2015 07:00:14 +0200
Good point. Yes, I have some changeFont: selectors in some of my classes, but I don’t think any of them should be in the responder chain in that situation. Anyway, when I place stops in each of them, I see that none of them gets called until I make the font panel the key, whereupon the changeFont: selector of my textView is (correctly) called.
Best regards
Kurt
> On 14 Jun 2015, at 06:55, Ken Thomases <email@hidden> wrote:
>
> On Jun 13, 2015, at 12:08 AM, Kurt Sutter <email@hidden> wrote:
>
>> 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.
>
> Have you implemented any method with the selector changeFont: in any of your classes which might be in the responder chain?
>
> Regards,
> Ken
>
_______________________________________________
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