Composite NSCell subclass event handling
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