• 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: reading NSTableView cell edits before user tabs or enters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading NSTableView cell edits before user tabs or enters


  • Subject: Re: reading NSTableView cell edits before user tabs or enters
  • From: j o a r <email@hidden>
  • Date: Fri, 16 Nov 2007 08:02:46 -0800

Hi,

I haven't tried it out, but it seems like some of the other delegate methods should do the trick:

	controlTextDidChange:
	control:textShouldEndEditing:

You can also grab the value of the current (text) cell being edited from the field editor:

<http://developer.apple.com/documentation/Cocoa/Conceptual/TextArchitecture/Concepts/TextFieldsAndViews.html >
<http://developer.apple.com/documentation/Cocoa/Conceptual/TextEditing/Tasks/FieldEditor.html >


Cheers,

j o a r


On Nov 16, 2007, at 7:43 AM, Randy Hulett wrote:

I am using an NSTableview and would like to better trap table cell edits as they happen.

1) I would like to be able to monitor changes to manage updateChangeCount during table cell editing.

2) If the user presses command-S to save, I would like to report the current cell edits/contents to the data source for saving.




I can trap THAT A CELL HAS CHANGED with controlTextDidChange. The problem is that I don't know the mechanism for reading active cell edits before the user tabs or enters (i.e. the content of the changes) and they are reported via:


- (void)tableView:(NSTableView *)aTableView setObjectValue: (id)anObject forTableColumn:(NSTableColumn *)aTableColumn row: (int)rowIndex




There must be some way to provide a row and column to the NSTableView and then to see NSCell edits before they are completed/ implemented, right?





Thanks for your help.

Randy

_______________________________________________

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


References: 
 >reading NSTableView cell edits before user tabs or enters (From: Randy Hulett <email@hidden>)

  • Prev by Date: Re: IS-A relationships in core data
  • Next by Date: Re: reading NSTableView cell edits before user tabs or enters
  • Previous by thread: reading NSTableView cell edits before user tabs or enters
  • Next by thread: Re: reading NSTableView cell edits before user tabs or enters
  • Index(es):
    • Date
    • Thread