Re: Best way to hook up Font Panel to floater (that isn't first responder)?
Re: Best way to hook up Font Panel to floater (that isn't first responder)?
- Subject: Re: Best way to hook up Font Panel to floater (that isn't first responder)?
- From: Aki Inoue <email@hidden>
- Date: Wed, 5 Mar 2008 14:35:52 -0800
OK, then, you can use -[NSFontManager setAction:] then 8-).
It's less intuitive than using -setTarget: but should be sufficient
for your need.
This is how:
- implement method with a signature unlikely to collide (i.e. -
mySuperPrivateChangeFont:) in an object that's always in the responder
chain such as the app controller.
- when the Font button in your panel is activated, you set your action
using -setAction:.
- and reset it upon the button deactivation
Aki
On 2008/03/05, at 14:18, Graham wrote:
Thanks for that...
I thought this seemed a bit too obvious to have overlooked and sure
enough, it's new for 10.5. I should have mentioned I need a solution
for 10.4 or later. Any ideas?
--------
S.O.S.
On 05/03/2008, at 3:17 AM, Benjamin Stiglitz wrote:
Is there a way to hook up the Font Panel directly? This needs to
be "spring loaded" so that the Font Panel follows the user's focus
most of the time, but switches to my panel when the user clicks
the Font button but returns to the original 1stR when they go back
to the main document. Or maybe my thinking is just wrong....?
Check out -[NSFontManager setTarget:].
-Ben
_______________________________________________
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
_______________________________________________
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