Re: NSImageView + Text
Re: NSImageView + Text
- Subject: Re: NSImageView + Text
- From: Hamish Allan <email@hidden>
- Date: Wed, 30 Nov 2005 03:17:15 +0000
On Tue, 29 Nov 2005 18:20:34 -0500, Mijobee <email@hidden> wrote:
I'm writing a hot key view that allows users to click on the cell
and then press a key combination which is then displayed in the
view. I've considered a few different design approaches but am not
sure the best way to implement it. Do I just need to subclass
NSImageCell, implement my keyDown and text drawing logic and write
a simple NSControl subclass or do I also need to subclass
NSImageView for my control? I'm trying to avoid piling controls on
top of each other but if that's really the best way then I'm open
to it. I know how to do the key translation, glyph lookup, etc.
Thanks in advance.
Take a look at NDHotKeyControl by Nathan Day (http://homepage.mac.com/
nathan_day/pages/source.html#ndhotkeyevent).
I found I needed to reparent a nested function to get it to build,
but other than the example project worked great.
I asked for people's opinion in this area recently (http://
www.cocoabuilder.com/archive/message/cocoa/2005/11/25/151093), but
nobody expressed any (unusual for this list of late!)
Best wishes,
Hamish
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden