Re: Font Panel Events Getting Blocked
Re: Font Panel Events Getting Blocked
- Subject: Re: Font Panel Events Getting Blocked
- From: Andrew Thompson <email@hidden>
- Date: Sat, 6 Dec 2003 00:27:06 -0500
On Dec 4, 2003, at 12:38 PM, John Nairn wrote:
My application has graphic objects, some of which have fonts. I bring
up font panel to let user change the font. The action is handled with
changeFont: method in the document class. There is, however, an
inspector panel. It still works when the panel is up unless editing of
an NSTextField in the panel is being done. Despite the fact that none
of the inspector text fields allow attributes, editing any field
blocks changeFont: events from getting through to the current document
window. There are two options for workable interface:
1. (Best) Somehow allow changeFont: to pass through the currently
active NSTextField in the inspector, but I could not find any method.
Change the method sent.
See NSFontManager -setAction
You can change the changeFont: action to something else (eg,
myChangeFont:) which only your code will respond to. This allows it to
pass by NSTextField.
You can then choose to post a regular changFont: up the responder chain
if you want anything to see the regular event. Or choose not to send
it, if you like.
2. (OK) Close the font panel whenever the first responder of the
inspector panel is a text editing field, but I could find any control
or window/panel messages to detect activation of a text field?
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside
(see you later space cowboy ...)
_______________________________________________
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.