Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6235261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:38:23+00:00 2026-05-24T10:38:23+00:00

I have an NSTableView that has one column of editable fields. Cell editing works

  • 0

I have an NSTableView that has one column of editable fields. Cell editing works fine, and my delegate routines get the update and can act on them as needed. The problem is that there is other code that updates values in the table based on timer or asynchronous (socket) input. When an updates event happens while editing is in progress, the update overwrites the user input.

I’m trying to use the delegate methods to block updates with an instance variable lock:

   - (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor;
{
    tableEditInProgress = YES;
    return YES;
}

- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
    tableEditInProgress = NO;
    return YES;
}

- (void)controlTextDidBeginEditing:(NSNotification *)aNotification
{
    tableEditInProgress = YES;
}

- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
    tableEditInProgress = NO;   
}

This only seems to work if the user actually types new text in the field before the update happens. I want updates to be blocked as soon as the user gets an edit cursor in the field (double click field contents).

I’m probably just using the wrong delegate methods.

TIA

joe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:38:24+00:00Added an answer on May 24, 2026 at 10:38 am

    Try ditching all this stuff, and try this instead:

    When you want to check whether the table is currently being edited, call [tableView currentEditor]; If this is non-nil, the table view is being edited. If it’s nil, it’s not being edited. That is:

    BOOL tableEditInProgress = ([tableView currentEditor] != nil);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSTableView that has 2 columns, one for an icon and the
I have a NSTableView that contains a NSButtonCell in one of the columns. I
I have an NSTableView that contains 2 different Columns - one is an NSImageCell
I have an NSTableView that is displaying different views for each cell. How can
In my application, I have a NSWindow that has a NSTableView object and a
I have an NSTableView that binds via an NSArrayController to an NSMutableArray. What's in
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
I have a script that appends some rows to a table. One of the
I have one window containing an NSTableView listing a bunch of managed objects. I
I have an NSTableView that is populating with my data source. My data model

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.