• 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
Changing the edit behaviour of a cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Changing the edit behaviour of a cell
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Updating application info plist
  • Next by Date: Re: Are these Apple or 3rd party classes? (printing error)
  • Previous by thread: Re: Are these Apple or 3rd party classes?
  • Next by thread: Re: Changing the edit behaviour of a cell
  • Index(es):
    • Date
    • Thread