Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
- Subject: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
- From: WT <email@hidden>
- Date: Sun, 12 Dec 2010 21:23:16 -0200
On Dec 12, 2010, at 9:12 PM, Kyle Sluder wrote:
> On Sun, Dec 12, 2010 at 2:41 PM, WT <email@hidden> wrote:
>> Hello,
>>
>> according to the iOS 4.2 NSDateFormatter class documentation, the -init method is available in iOS 2.0 through iOS 3.2, but it does not offer an alternative method to initialize a newly allocated date formatter (or, if it does, I missed it on repeated readings of the docs). How then?
>>
>> I went ahead and tried -init anyway and, sure enough, a problem arises:
>
> Calling -[NSDateFormatter init] compiles fine for me, without
> warnings. Googling seems to indicate this is a docs bug; they removed
> -init from NSDateFormatter.h (actually commented it out) in 10.6/iOS 4
> and the documentation team's tools picked it up as a removal rather
> than just cleaning up the redundant declaration of -init.
>
> Your stack trace points at a different problem. What does
> -[AppDelegate localPtBr] look like?
Ahh... thanks for both answers. I'll investigate further why I'm getting that malloc error after I get some sleep. Anyhow, here's
- (NSLocale*) localePtBr;
{
if (localePtBr_ == nil)
{
localePtBr_ = [[NSLocale alloc] initWithLocaleIdentifier: @"pt_BR"];
}
return localePtBr_;
}
Thanks again.
WT_______________________________________________
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