• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSActionCell mouseEntered crashes application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSActionCell mouseEntered crashes application
      • From: glenn andreas <email@hidden>
    • Re: NSActionCell mouseEntered crashes application
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Design question
  • Next by Date: Re: NSActionCell mouseEntered crashes application
  • Previous by thread: Re: OT: socket question
  • Next by thread: Re: NSActionCell mouseEntered crashes application
  • Index(es):
    • Date
    • Thread