NSActionCell mouseEntered crashes application
NSActionCell mouseEntered crashes application
- Subject: NSActionCell mouseEntered crashes application
- From: Marc Monguio <email@hidden>
- Date: Thu, 27 Apr 2006 18:53:28 +0200
I've subclassed NSActionCell so that I can mouseover on the area
defined by an NSRect but then the application crashes. The code looks
like following:
@implementation MyCell
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)
controlView;
{
NSRect userBounds = cellFrame //I'm using the cellFrame to simplify
the example
NSTrackingRectTag trackingTag = [[self controlView]
addTrackingRect:userBounds owner:self userData:nil assumeInside:NO];
// (...)
}
- (void)mouseEntered:(NSEvent *)theEvent;
{
MLogString (@"In");
}
- (void)mouseExited:(NSEvent *)theEvent;
{
MLogString (@"Out");
}
@end
Unfortunately when the mouse enters the NSRect the application
unexpectedly closes showing error:
EXC_BAD_ACCESS (0x0001)
KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
Thread 0 Crashed:
0 objc_msgSend_rtp + 32
1 -[NSWindow sendEvent:] + 6424
2 -[NSApplication sendEvent:] + 4172
3 -[NSApplication run] + 508
4 NSApplicationMain + 452
5 main + 64 (main.m:23)
6 start + 404
Does anybody have a reason or solution for this?
thanks in advance,
Marc M.
_______________________________________________
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