• 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
Composite NSCell subclass event handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Composite NSCell subclass event handling


  • Subject: Composite NSCell subclass event handling
  • From: Greg <email@hidden>
  • Date: Mon, 14 Mar 2005 10:03:09 +1000

Hi,
I have a subclass of NSCell that contains a composition of other NSCells, eg NSImageCell, NSPopUpButtonCell, NSTextFieldCell and NSButtonCell. In my "controller cell" I have implemented


- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView;

In this method I see if the point is in the rect of each control and if it is, for example in the NSButtonCell's rect, I call the same startTrackingAt: on the button cell. The problem I seem to be experiencing is that it is that the button cell does not seem to showing the depressed state.

- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView
{
if (NSPointInRect(startPoint, _addRect))
{
NSLog(@"starting Point: %@ Rect: %@", NSStringFromPoint(startPoint), NSStringFromRect(_addRect));
return [_add startTrackingAt:startPoint inView:controlView];
}

return NO;
}


Does anyone know why this would be the case? Is there any example code that shows the use of implementing a composite type cell?

Regards,
Greg

_______________________________________________
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: Composite NSCell subclass event handling
      • From: daniel <email@hidden>
  • Prev by Date: Re: Force an NSTextField to give up focus
  • Next by Date: Why would I not be able to load the NIB file?
  • Previous by thread: Re: Force an NSTextField to give up focus
  • Next by thread: Re: Composite NSCell subclass event handling
  • Index(es):
    • Date
    • Thread