• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom NSCell Editing Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Custom NSCell Editing Question
      • From: Michael Tyson <email@hidden>
References: 
 >Custom NSCell Editing Question (From: Eric Jutras <email@hidden>)

  • Prev by Date: Out-of-bounds error when removing entry from NSForm
  • Next by Date: paths for contents of a directory
  • Previous by thread: Custom NSCell Editing Question
  • Next by thread: Re: Custom NSCell Editing Question
  • Index(es):
    • Date
    • Thread