• 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 Cell edit values.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView Cell edit values.


  • Subject: Re: NSTableView Cell edit values.
  • From: Totte Alm <email@hidden>
  • Date: Wed, 25 Feb 2009 20:19:45 +0100

hello,

thx for the fast answer, but it seems to be more to it.

The "save" is done in a IBAction, trigged by a button. I moved all save code from that method to another method, and set an NSTimer to call that mathod, and before that I told the the Window to set the focus. The problem is that no matter what time I set on the NSTimer, the setObjectValue delegate for the NSTableView (which get the newly edited value) is called after the method called from the NSTimer is called, which does the save.

There must be a way to trigger "setObjectValue" directly so it is handled "now" and not "later".

cheers,

/ Totte

25 feb 2009 kl. 19.58 skrev Corbin Dunn:


Le Feb 25, 2009 à 10:44 AM, Totte Alm a écrit :

Hello cocoa experts,

I've stumbled on a problem with a GUI, where the user can edit values using a NSTableView, but if the user types something in a cell, then click the "do stuff" button while the cell is still in editmode, the current change is not propagated back to underlying object.

So, the question:
How can I tell the NSTableView to "propagate" current changes, i.e. stop being in edit mode?

Make the field editor resign first responder status; if it did successfully do that, then the change was committed. If not, a validation error happened. IE:


[self.window makeFirstResponder:tableView];

.corbin




-------------------------------------------------------------------------------------- - There is no spoon. / Neo

_______________________________________________

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: NSTableView Cell edit values.
      • From: Corbin Dunn <email@hidden>
References: 
 >NSTableView Cell edit values. (From: Totte Alm <email@hidden>)
 >Re: NSTableView Cell edit values. (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: Running Cocoa applications from file servers
  • Next by Date: Re: Observing Managed Object Changes. Was: Strange ... behavior
  • Previous by thread: Re: NSTableView Cell edit values.
  • Next by thread: Re: NSTableView Cell edit values.
  • Index(es):
    • Date
    • Thread