Re: Bug with -changeAttributes: in NSFontManager/Font Panel?
Re: Bug with -changeAttributes: in NSFontManager/Font Panel?
- Subject: Re: Bug with -changeAttributes: in NSFontManager/Font Panel?
- From: Graham Cox <email@hidden>
- Date: Wed, 17 Sep 2008 14:14:42 +1000
On 17 Sep 2008, at 1:43 pm, Kyle Sluder wrote:
On Tue, Sep 16, 2008 at 7:50 PM, Graham Cox <email@hidden>
wrote:
I'm not using a text view directly, but I do have attributed text
that could
take advantage of the Font Panel's UI if this worked. Since I'm
trying to
receive this in a dialog that has text fields, I wonder if the
message is
being consumed by the field editor or one of my fields. That's
still a bug!
What would seem to make sense is that setTarget on NSFontManager
should set
the target for all changexxx messages it sends.
Try replacing the field editor for the window with a custom class that
just logs out to the console. If you can confirm your suspicion, can
you change the field editor of your custom view or your window to a
custom subclass that handles the messages appropriately?
OK, this was a great idea, and has been fruitful.
When my dialog has focus, my test text field gets, logs (and swallows)
the changeAttributes: message.
However, it also shows the bug is even worse than I previously thought
- if the Font Panel itself or the Color Panel is made key, I stop
getting -changeAttributes: - my guess there is that it's going to the
field editor for those panels. Problem is that those panels are made
key by the very act of using the attributes controls! Thus it's even
more imperative that -setTarget: affects the -changeAttributes:
message as well as -changeFont:, otherwise the Font Panel's UI is
useless except in precisely one situation - altering text in an
NSTextView that is first responder.
While I'm usually hesitant to be critical of classes I don't
necessarily fully understand, I have to say the phrase "half-assed" is
springing to mind.
Back to the bug reporter...
cheers, Graham
_______________________________________________
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