Changing the edit behaviour of a cell
Changing the edit behaviour of a cell
- Subject: Changing the edit behaviour of a cell
- From: Tom Davie <email@hidden>
- Date: Fri, 9 Oct 2009 17:51:55 +0200
I've been busy reading the documentation all day, and can't for the life of
me figure out how to change the editing behavior of an NSCell.
I have a cell, which I'd like to pop up a window over when the user attempts
to edit it (much like many websites do to present a date picker for
example).
I have tried overriding
**
*
- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent
- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart
length:(NSInteger)selLength
and
- (void)endEditing:(NSText *)textObj
with only limited success. selectWithFrame... appears to give me a slightly
bogus rectangle (about 50 pixels off to the upper left, after running it
through [controlView convertPointToBase:aRect.origin]), while
editWithFrame... and endEditing... never seem to be called.
What is the correct way to set up such behaviour?
Thanks
Bob
*
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden