Re: Custom NSCell Editing Question
Re: Custom NSCell Editing Question
- Subject: Re: Custom NSCell Editing Question
- From: Eric Jutras <email@hidden>
- Date: Mon, 14 May 2007 23:56:27 -0400
I fixed it, nevermind.
On 14 mai 07, at 23:31, Eric Jutras wrote:
Hello List,
The situation:
I have a single-column table view with a NSCell subclass that
displays like this: [ICON] [TEXT TITLE] [COUNTER]
This NSCell draws itself based on its object value, which is a
NSDictionary with the icon, the text and the counter values.
So this is like in Mail.app's mailbox table view, right.
The problem:
I'm having a hard time implementing editing for this. I want
NSTextFieldCell-like editing of the [TEXT TITLE] part of the cell.
On double click of the
table view row, - (void)editColumn:(int)columnIndex row:(int)
rowIndex withEvent:(NSEvent *)theEvent select:(BOOL)flag
is being sent, BUT my custom NSCell _isn't_ getting either
- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)
theEvent
or
- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart
length:(int)selLength
both of which are supposedly sent after double click (according to
the doc.)
What I have tried so far:
- replacing - init with initWithTextCell:
- making my NSCell sub. a sub of NSTextFieldCell instead and
overriding -stringValue to return the [TEXT TITLE]
Thanks
- Éric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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