• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSFontPanel for a modal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSFontPanel for a modal window
      • From: Ken Thomases <email@hidden>
    • Re: NSFontPanel for a modal window
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Language options: Objective-C, Swift, C or C++?
  • Next by Date: Re: Language options: Objective-C, Swift, C or C++?
  • Previous by thread: Re: Language options: Objective-C, Swift, C or C++?
  • Next by thread: Re: NSFontPanel for a modal window
  • Index(es):
    • Date
    • Thread