• 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
How do I obtain the default country?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I obtain the default country?


  • Subject: How do I obtain the default country?
  • From: "BK [address used for mailing lists only]" <email@hidden>
  • Date: Sun, 26 Dec 2004 11:13:10 +0900

I have a popup menu with a choice of 200 something countries. The menu should be presented to a user such that the country he is in will be preselected already as the default.

So far I have been poking around in /Library/Preferences/.GlobalPreferences.plist and picked some of the fields that seem to contain IANA codes for countries and country names. This works but since there are no tags that describe exactly what those values are used for by OSX, I consider this a quick and dirty interim hack which is bound to break at some point or in certain situations.

I would rather like to use a proper API call which tells me what the current locale is set to. Also, this is for a system level tool, and NOT a user level tool, so I would like to make sure I pick up a system wide setting and not accidentally a user preference.

What is considered best practise in Cocoa to obtain such system level information and are there any examples?

thanks
rgds
bk

_______________________________________________
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


  • Prev by Date: Re: Disabling NSToolbarItem label for view item in text only mode
  • Next by Date: Using Java objects in ObjC
  • Previous by thread: Re: Disabling NSToolbarItem label for view item in text only mode
  • Next by thread: Using Java objects in ObjC
  • Index(es):
    • Date
    • Thread