NSTextField eating NSFontPanel..?

212 views Asked by At

I'm having a weird problem receiving any messages from an NSFontPanel when an NSTextField in my app is focussed.

Even a subclass of NSTextField doesn't receive anything from the font panel.. it seems that everything sent by the panel e.g. when changing fonts, colors, etc. is just eaten somewhere in AppKit.

All works fine when the text field is not focussed, i.e. I'm getting the usual changeFont: and related messages.

Also, unlike in NSTextView there doesn't appear to be any kind of property to toggle font panel support on/off in an NSTextField..

Any hints much appreciated!

1

There are 1 answers

3
Willeke On BEST ANSWER

The messages are eaten by the NSTextView cell of the NSTextField. The property to toggle rich text is allowsEditingTextAttributes or "Rich Text" in the xib.