• 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
Re: working with font manager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: working with font manager


  • Subject: Re: working with font manager
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 25 Jul 2003 14:34:42 -0500
  • Resent-date: Fri, 25 Jul 2003 14:35:47 -0500
  • Resent-from: Fritz Anderson <email@hidden>
  • Resent-message-id: <email@hidden g>
  • Resent-to: email@hidden

Make the controller the window's delegate (which will get it all its delegate/responder messages. Also, when you display the font window, make the window itself its own first responder. The controller will then get changeFont: messages.

Or simply don't have anything in the responder chain below the window itself that is interested in changeFont: messages; you'll note that's how ProjectBuilder finesses the problem.

-- F

On Friday, 25 July 2003, at 12:36 PM, Francisco Tolmasky wrote:

Yes but change font is not sent to the delegate unfortunately, but to the first responder. So how do I accommodate for that. How do I make the Preferences Controller the first responder?
On Friday, July 25, 2003, at 07:29 AM, Fritz Anderson wrote:

The controller object for your preference window would have an outlet for the sample text field, a reference to each NSFont you keep track of, and some way of knowing which NSFont is the current target. The controller is the delegate (-[NSFontManager setDelegate:]) of the shared NSFontManager. When the controller receives changeFont:, it passes the current font through convertFont: to get the new font, and tells both the sample text and any affected main text to change accordingly. There is no need to subclass NSTextField.

-- F

On Friday, 25 July 2003, at 3:18 AM, Francisco Tolmasky wrote:

Ok, I'm kind of confused. All I want is a system like Project Builder's where when I change the font in the preferences the little text field updates and all the text in the app changes. This is the ONLY place the font panel will be used. Do I need to subclass nstextfield to respond to fotn manager changes? Is there a way to make sure that only that one text field EVER listens to font manager changes?
--
Fritz Anderson - Consulting Programmer - Chicago, IL
Mail: <email@hidden>
Risumi: <http://resume.manoverboard.org>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSTIFFCompressionPackBits not compressing?
  • Next by Date: Re: NSFont errors
  • Previous by thread: Re: working with font manager
  • Next by thread: FoundationKit md5/checksum
  • Index(es):
    • Date
    • Thread