FROM : Andy Kim
DATE : Sat Jun 28 21:10:11 2008
For a quick test, see if putting in the following in your cell
subclass makes it work again:
- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:
(NSRect)cellFrame ofView:(NSView*)controlView
{
return NSCellHitContentArea | NSCellHitEditableTextArea |
NSCellHitTrackableArea;
}
It might not be exactly what you want, but I'm pretty sure your
solution is a good implementation of this method.
Andy Kim
On Jun 28, 2008, at 6:24 AM, Moray Taylor wrote:
> Hi, hope someone can help...
>
> I have an app that uses a custom NSCell that implements the
>
> - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame
> ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp
>
> method.
>
> In Tiger, this works just fine, if I build targeting the 10.5 API,
> it does not work, the method does not get called at all, I can put
> an NSLog right at the start, and it never happens.
>
> If I build targeting 10.4, it works great, even if the host machine
> is running Leopard, so it seems its an API difference.
>
> If anyone can shed any light on this, I'd be eternally grateful!
>
> Thanks a lot
>
> Moray
DATE : Sat Jun 28 21:10:11 2008
For a quick test, see if putting in the following in your cell
subclass makes it work again:
- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:
(NSRect)cellFrame ofView:(NSView*)controlView
{
return NSCellHitContentArea | NSCellHitEditableTextArea |
NSCellHitTrackableArea;
}
It might not be exactly what you want, but I'm pretty sure your
solution is a good implementation of this method.
Andy Kim
On Jun 28, 2008, at 6:24 AM, Moray Taylor wrote:
> Hi, hope someone can help...
>
> I have an app that uses a custom NSCell that implements the
>
> - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame
> ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp
>
> method.
>
> In Tiger, this works just fine, if I build targeting the 10.5 API,
> it does not work, the method does not get called at all, I can put
> an NSLog right at the start, and it never happens.
>
> If I build targeting 10.4, it works great, even if the host machine
> is running Leopard, so it seems its an API difference.
>
> If anyone can shed any light on this, I'd be eternally grateful!
>
> Thanks a lot
>
> Moray
| Related mails | Author | Date |
|---|---|---|
| Moray Taylor | Jun 28, 15:24 | |
| Andreas Mayer | Jun 28, 18:28 | |
| Moray Taylor | Jun 28, 20:10 | |
| Andy Kim | Jun 28, 21:10 | |
| William Squires | Jun 29, 01:57 | |
| Graham Cox | Jun 29, 06:26 | |
| Moray Taylor | Jun 30, 16:24 | |
| Corbin Dunn | Jun 30, 18:09 |






Cocoa mail archive

