• 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
Notification when window is closing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Notification when window is closing?


  • Subject: Notification when window is closing?
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Fri, 07 Nov 2008 12:27:26 -0500

I'm working on my App's preference window... To populate the window's control with the UserDefaults, I use the windowDidLoad method, grab the defaults and populate my fields/controls (I'm doing this in my PreferenceController, which is a subclass of NSWindowController)

I was wondering if there is a similar method I can override when the window is closing so that I can save the user's change in the defaults???

The problem is that, I have 2 text fields in my preference window and... if the user edits those text fields and closes the preference window while the focus is still on a text field (i.e. the user hasn't "tabbed out" of the textfield) I lose the user modification because textControlDidChange did not get fired and therefor my preferences weren't updated...


Any help would be appreciated!

Jean-Nicolas Jolivet
_______________________________________________

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: Notification when window is closing?
      • From: Randall Meadows <email@hidden>
  • Prev by Date: Re: Getting started with NSTableView
  • Next by Date: Re: Notification when window is closing?
  • Previous by thread: Re: Getting started with NSTableView
  • Next by thread: Re: Notification when window is closing?
  • Index(es):
    • Date
    • Thread