Can anyone suggest a replacement for
Regioncode xyz = (Regioncode)GetscriptmanagerVariable(smRegionCode)?
The problem is that GetscriptmanagerVariable() is deprecated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The functionalities you’re looking for is now in CFLocale. Read also Locale programming guide and Internationalization programming topics.
But you need to accept the fact that these routines don’t return
RegionCodeanymore. Rather, they give you data structures which represent the user’s region etc. which can be used with Core Foundation / Cocoa.In general, it’s not a good idea to replace these Carbon deprecations function by function and line by line. It’s better to rewrite the affected codes wholesale to Cocoa. In particular, there’s very few place where you need to use
RegionCodeexplicitly; in a modern Cocoa app all these things are taken care of transparently by the system.