• 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 in a sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView in a sheet


  • Subject: Re: NSTableView in a sheet
  • From: Itrat Khan <email@hidden>
  • Date: Thu, 28 Mar 2002 03:34:44 -0500

On Thursday, March 28, 2002, at 01:20 AM, Pete Yandell wrote:

If I'm currently editing an item in the NSTableView and I click the OK button on my sheet (which causes the normal orderOut: and endSheet: calls), the sheet closes without the tableView:setObjectValue:forTableColumn:row: method being called on my NSTableView delegate. That means that the data being edited never gets updated.

In your OK button's action method, use:

[[sender window] makeFirstResponder:nil];

where sender is the parameter to the action (i.e. the button). That will force the window's field editor to resign its first responder status and commit any text the user may be editing in the table.

Itrat.

..................................................................
Itrat Khan
Modeless Software, Inc.
http://www.modeless.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSTableView in a sheet (From: Pete Yandell <email@hidden>)

  • Prev by Date: Re: [objC retain];
  • Next by Date: NSCell problems again!
  • Previous by thread: NSTableView in a sheet
  • Next by thread: Problems with NSString: initWithCString
  • Index(es):
    • Date
    • Thread