Re: Updating UI Date formats on user NSUserDefault changes
Re: Updating UI Date formats on user NSUserDefault changes
- Subject: Re: Updating UI Date formats on user NSUserDefault changes
- From: Danny Frey <email@hidden>
- Date: Tue, 28 Sep 2004 14:04:10 +0100
On Sep 28, , at 3:25, Sean McBride wrote:
Danny Frey (email@hidden) on Sat, Sep 25, 2004 09:26 said:
I'm displaying a date in an NSTableView column, I took a look at
Mail.app to see how to do it right.
Mail date fields update themselves immediately if a change is made in
the System Preferences, International settings, Dates Formats.
Specifically clicking on the Customize button and then changing the
Long Date popups, then clicking OK makes the change.
I'd like this kind of behaviour in my app, does anyone have a clue as
to the right way to go about this?
I would suggest watching for the NSUserDefaultsDidChangeNotification
notification. An app's defaults include not just those it manages
itself, but those that the system provides. So if you get an
NSUserDefaultsDidChangeNotification, some default have changed. Alas,
it
doesn't tell your which, so you'll have to simply test for changes in
keys you are interested in.
Well firstly Sean thanks for taking the time to reply.
In my earlier posting I included a breakdown of some of my current
attempts at getting this working. Your suggestion was indeed the first
thing I tried, unfortunately although I do pick up window position/size
change notifications in my handler for
NSUserDefaultsDidChangeNotification, (proves it's working) the method
does not seem to get called when the Dates Format is changed in
Preferences. It would be nice to get confirmation on this in case it's
something spooky with my system.
Consequently I was looking at Binding to help out.
All the best
Danny
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden