• 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: NSTableView and NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView and NSTextView


  • Subject: Re: NSTableView and NSTextView
  • From: Drew McCormack <email@hidden>
  • Date: Thu, 18 Oct 2001 10:11:21 +0200

On Wednesday, October 17, 2001, at 09:31 , Douglas Davidson wrote:

On Wednesday, October 17, 2001, at 08:47 PM, Drew McCormack wrote:

I want to have an NSTableView such that a cell can be edited, and when the return/enter is hit, the row grows and the cell doesn't stop editing. In other words, I would like NSTextView like behavior in an NSTableView. Only problem is, there is no NSTextViewCell. What is the best way to go about this?

When a cell is being edited, it gets a field editor, which is an NSTextView. Normally this textview has been configured to end editing on a return or tab, by sending it setFieldEditor:YES. If you send it setFieldEditor:NO, then it will behave like a standard textview. There are a number of places where you might do this; the NSCell method setUpFieldEditorAttributes: comes to mind.
I'm a little confused by this. It seems logical enough, until I read the docs for NSTableColumn, which states that the default cell is of type NSTextFieldCell. NSTextField does not derive from NSText, and so doesn't have the method "setFieldEditor:".
Yet, what you are saying seems right, because NSCell does have a method setFieldEditorAttributes:(NSText *)textObj, so I could send the "setFieldEditor:" message to the NSText object passed in. I will try this, and I'm sure it will work, but can you perhaps tell me where my understanding is breaking down? Where does the NSText object passed to "setFieldEditorAttributes:" come from, because the NSTableColumn has NSTextFieldCell's, and these are not NSText objects?

Drew McCormack


  • Follow-Ups:
    • Re: NSTableView and NSTextView
      • From: Ondra Cada <email@hidden>
References: 
 >Re: NSTableView and NSTextView (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: What happens to the AppKit Framework when an user logout ?
  • Next by Date: Re: Settings an explicit outgoing mailhost when using Message.framework
  • Previous by thread: Re: NSTableView and NSTextView
  • Next by thread: Re: NSTableView and NSTextView
  • Index(es):
    • Date
    • Thread