Re: + initialize docs conflict?
Re: + initialize docs conflict?
- Subject: Re: + initialize docs conflict?
- From: Ricky Sharp <email@hidden>
- Date: Tue, 01 Feb 2005 06:22:35 -0600
On Tuesday, February 01, 2005, at 02:32AM, Scott Anguish <email@hidden> wrote:
>
>On Jan 31, 2005, at 6:53 PM, Ricky Sharp wrote:
>
>> When reading up on NSObject's class method 'initialize', I found these
>> two quotes in the docs:
>>
>> "Each class receives the initialize message just once from the runtime
>> system."
>>
>> "Normally the runtime system sends a class just one initialize
>> message. However, if for some reason an application or the runtime
>> system generates additional initialize messages, it is a good idea to
>> prevent code from being invoked more than once"
>>
>> I can see where an application developer may (accidentally?) have code
>> to call initialize more than once. But why do the docs have
>> conflicting statements regarding the runtime?
>>
>> I have no problem modifying my initialize implementations with a
>> one-shot flag if need be. However, if the runtime is only ever
>> suppose to call initialize once, I'll then file a bug against the
>> docs.
>
>
> they don't conflict, but they're probably not as clear as they
>should be.
>
> I'd say file the bug (include the citations for both passages
>please!) and we'll look at clarifying that.
<rdar://3984640>
Thanks to all those who have replied. I do agree with all of you in that the docs should be clearer. And, ultimately that the runtime may call initialize more than once.
I've since modified all my code to include a one-shot flag.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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