Re: NSCell subclass and startTracking
Re: NSCell subclass and startTracking
- Subject: Re: NSCell subclass and startTracking
- From: Quentin Mathé <email@hidden>
- Date: Sun, 19 Jan 2003 12:25:01 +0100
Le vendredi, 17 jan 2003, ` 23:11 Europe/Paris, Quentin Mathi a icrit :
I have a table view with a custom data cell defined by the following
NSTextFieldCell subclass :
@implementation DSTextFieldCell {
- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView
*)controlView {
[start release];
start = [[NSDate date] retain];
return YES;
}
- (void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint
inView:(NSView *)controlView mouseIsUp:(BOOL)flag {
NSTimeInterval elapsed = [start timeIntervalSinceNow];
if (elapsed < -1) {
[(NSTableView *)controlView editColumn:0 row:[(NSTableView
*)controlView selectedRow] withEvent:nil select:YES];
}
}
}
I have the following problem : when I click on a cell in the table
view, the startTrackingAt:startPoint:inView is not called and I don't
understand why ?
I have done more testing and I can now said the problems only occurs
with NSTextFieldCell and NSImageCell subclass but not with NSCell or
NSActionCell subclass. Is there something in NStextFieldCell and
NSImageCell which override the methods related to tracking stuff (then
change the behavior) or perhaps it's a bug I don't know
--
Quentin Mathi
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.