FROM : Aki Inoue
DATE : Wed Mar 05 23:35:52 2008
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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Wed Mar 05 23:35:52 2008
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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Graham | Mar 4, 00:03 | |
| Benjamin Stiglitz | Mar 4, 17:17 | |
| Graham | Mar 5, 23:18 | |
| Aki Inoue | Mar 5, 23:35 |






Cocoa mail archive

