Re: Custom NSCell Editing Question
Re: Custom NSCell Editing Question
- Subject: Re: Custom NSCell Editing Question
- From: Michael Tyson <email@hidden>
- Date: Sun, 20 May 2007 13:23:44 +1000
Eric,
I'm having the same problem - custom NSTextFieldCell that has an
overridden drawInteriorWithFrame:inView:, and editWithFrame/
selectWithFrame appear not to be being called. Editable and enabled
are set in Interface Builder...
What did you do to fix it?
On 15/05/2007, at 1:56 PM, Eric Jutras wrote:
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
--
Michael Tyson | michael.tyson.id.au
m: (+61) 0407 754 124
e: email@hidden
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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