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 8994339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:24:33+00:00 2026-06-15T23:24:33+00:00

I have a TableView bound to a Core Data entity and I have a

  • 0

I have a TableView bound to a Core Data entity and I have a saveAction method in my AppDelegate.

First I create a button to link to saveAction in AppDelegate. When I click the button the saveAction method gets fired just fine and the data is saved.

I want to trigger this same function when I close the window, so I create the following in AppDelagate:

- (BOOL)windowShouldClose:(id)sender{
    // Breakpoint here is reached.
    [self saveAction:sender];
    return true;
}

When I close the window, the breakpoint is reached, saveAction runs, but nothing is saved. The only difference that I can ascertain is that when the button is clicked, saveAction receives sender of NSButton, but when triggered through windowShouldCLose the sender is logged as NSWindow.

Is there anything I’m missing? Very new to all this so pretty likely. Any advice would be appreciated.

  • 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-06-15T23:24:34+00:00Added an answer on June 15, 2026 at 11:24 pm

    i had almost the same issue – fixed after adding that :

    in interface builder, select the window you wish to control the “should close” feature, and open the connections inspector … you must have a connection between your referencing outlet and the AppDelegate, but you must ALSO have a connection between the outlet named “Delegate” and the AppDelegate (in my case, i had only the 1st one by default, getting mad for days with this “should close” function, everything get suddenly OK after adding the 2nd one …)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that gets data from core data. I added a section,
Hi i have create 2 class tableView, the first class from a cell call
I have an NSTableView bound to a core-data-backed NSArrayController by binding individual columns to
I have a UI tableView and I am trying to create a button like
I have tableview, where create new rows and set them layout manually. In every
I have a tableview whose columns are bound to an array controller. I'm programmatically
Here is my problem: I have a Core Data- Document based program with ARC
Data: An entity with an attribute 'page' (int). Interface: NSSlider- value is bound to
I have a navigation based app that uses Core Data for storage. The schema
The issue I have a popup button ( NSPopUpButton ) that is bound to

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.