• 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: Add and Edit a table row
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add and Edit a table row


  • Subject: Re: Add and Edit a table row
  • From: John Morgan <email@hidden>
  • Date: Tue, 7 Mar 2006 09:53:56 -0800

Hello,

Here is a discussion from the archives http://lists.apple.com/ archives/cocoa-dev/2005/Dec/msg01467.html

It references NSArrayController and Core Data, but you can easily strip that out and implement your data source stuff.

HTH,
John Morgan

On Mar 7, 2006, at 6:39 AM, Pete Bates wrote:

In an editable table, when the user tabs out of the last cell, rather than wrapping to the table's first cell, I would like to add a new row and edit the first cell of the new row. I have tried subclassing the window to catch the keydown event then adding an object to my datasource for the table, reloading the table data, and using – editColumn:row:withEvent:select: to edit the leftmost new cell. This approach has two problems: first, the window in question will have 3 such tables. How do I know from which table the keyDown event originated? Do I need an"activeTable" ivar to track this... seems kind of kludgy. The second issue is that I have not been able to select the desired cell for editing using editColumn:row:withEvent:select: Instead, the entire (former) last row is selected. Now the table view and data source both have the additional (row/data object) added, and I can manually select and edit the new row.

Doesn't seem like this is such a novel idea, but I haven't been able to locate a prior solution. If anyone has an answer, a suggestion, or can point me to a previous discussion, I'd appreciate it. Thanks.

Pete _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Add and Edit a table row (From: Pete Bates <email@hidden>)

  • Prev by Date: Re: Add and Edit a table row
  • Next by Date: NSAppleEventDescriptor how to get the signature of the calling Application ,
  • Previous by thread: Re: Add and Edit a table row
  • Next by thread: NSAppleEventDescriptor how to get the signature of the calling Application ,
  • Index(es):
    • Date
    • Thread