On Saturday, January 28, 2012 13:44 CET, Ivan Vučica <[email protected]> wrote: > Upon first look and quick examination, this looks like a bug in -base. I > just tested getting value for key NSShortDateFormatString on OS X and it > works.
Ah, OK. But it must have been working some time ago I guess. > > However, OS X also deprecates the key NSShortDateFormatString. They are > possibly unhappy that this works by SystemPreferences actually storing the > format in user's global defaults. (I don't think they went and hacked this > by handling the key NSShortDateFormatString in a special way.) > > Maybe this should be considered bug in AddressManager. Shouldn't > NSDateFormatter be used to format dates? I looked at NSDateFormatter, and after some fiddling around with it, it works as expected. Sent a patch for review to Riccardo. Thanks for the pointer. Sebastian > > On Sat, Jan 28, 2012 at 13:36, Sebastian Reitenbach < > [email protected]> wrote: > > > Hi, > > > > while looking into AddressManager, I found, I can enter a birth date, but > > its not shown there. > > > > Its using this in Frameworks/AddressView/ADPersonPropertyView+Private.m to > > set the value that should be shown: > > > > val = [val descriptionWithCalendarFormat:[[NSUserDefaults > > standardUserDefaults] objectForKey:NSShortDateFormatString]]; > > > > Looking into -base, I think it should take the format string from > > Resources/Languages/<Language> > > > > I don't have a locale set, but also tried to set LC_CTYPE='de_DE.UTF-8' or > > LANG, or LC_ALL, but no change. > > > > only when I define the default > > > > defaults write NSGlobalDomain NSShortDateFormatString '%d.%m.%Y' > > > > Then AddressManager shows me the birth date. > > > > without the default set, [[NSUserDefaults standardUserDefaults] > > objectForKey:NSShortDateFormatString] returns NULL. > > > > Is this a problem in AddressManager, or -base? > > > > regards, > > Sebastian > > > > _______________________________________________ > > Discuss-gnustep mailing list > > [email protected] > > https://lists.gnu.org/mailman/listinfo/discuss-gnustep > > > > > > -- > Ivan Vučica - [email protected] _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
