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

  • SEARCH
  • Home
  • 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 136041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:53:09+00:00 2026-05-11T06:53:09+00:00

I have a simple cocoa user interface with a list of items and a

  • 0

I have a simple cocoa user interface with a list of items and a search field, implemented using NSTableView and NSSearchField, respectively. The data source and all of the bindings are set up and working nicely. I see my data in the list, and I can search through it by typing strings in the search field. As I type in more text, the number of items in the list gets smaller and smaller, eventually reduced to the one item I was searching for.

Now, how can I clear the text in the search field and force the list to go back to normal? I can make this happen by clearing the text manually (using the keyboard), but when I try to do it programmatically, the hidden items in the list do not come back.

I’m using this:

[searchField setStringValue:@'']; 

to clear the text in the search field, but it does not reset the list.

Any ideas? Is there a simple [searchField reset] method that I just can’t find in the documentation?

  • 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. 2026-05-11T06:53:10+00:00Added an answer on May 11, 2026 at 6:53 am

    I figured it out. The following code works:

    [searchField setStringValue:@'']; [[[searchField cell] cancelButtonCell] performClick:self]; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple list of items that needs to be printed using Cocoa.
I have a simple Cocoa image preview app. The user selects a file using
I have a simple Cocoa app using a NSWindowController subclass. In the nib I
I am a newbie for MAC development, I have a simple Cocoa Application using
I have a very simple Mac Cocoa app that just has a Web View
I am trying a simple application using NSArrayController and cocoa bindings. The application contains
I have a simple cocoa application with an editable textfield text1 at the top
I have a simple cocoa application with a table view displaying a few entries.
I'm trying to design a simple Cocoa application and I would like to have
I have developed a very simple C++ based cocoa touch static library and a

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.