On Thu, Feb 11, 2010 at 10:00 PM, Graham Cox wrote:
> I don't think that's true. Surely by definition "THE designated initializer"
> is a single specific method.
No.
http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/FrameworkImpl.html
--Kyle Slu
On 12/02/2010, at 4:52 PM, Quincey Morris wrote:
> since classes are allowed to have multiple designated initializers.
I don't think that's true. Surely by definition "THE designated initializer" is
a single specific method.
The docs state:
"The designated initializer is the method in each c
On Feb 11, 2010, at 21:19, Michael Ash wrote:
> You override the one that's documented to be the designated initializer.
Or, all of the ones that are documented to be the designated initializers,
since classes are allowed to have multiple designated initializers.
The point I tried to make earli
On Fri, Feb 12, 2010 at 12:07 AM, Charles Srstka
wrote:
> On Feb 11, 2010, at 10:28 PM, Graham Cox wrote:
>
>> On 12/02/2010, at 1:43 PM, Gordon Apple wrote:
>>
>>> My point was that if all Cocoa classes called "init"
>>> somewhere in their other initializers (or had a two-step initialization
>>>
On Feb 11, 2010, at 10:28 PM, Graham Cox wrote:
> On 12/02/2010, at 1:43 PM, Gordon Apple wrote:
>
>> My point was that if all Cocoa classes called "init"
>> somewhere in their other initializers (or had a two-step initialization
>> similar to what MacApp did), then you could simply override (not
On 12/02/2010, at 1:43 PM, Gordon Apple wrote:
> My point was that if all Cocoa classes called "init"
> somewhere in their other initializers (or had a two-step initialization
> similar to what MacApp did), then you could simply override (not call)
> "init" for simple ivar initialization in a sub
> My point was that if all Cocoa classes called "init"
> somewhere in their other initializers (or had a two-step initialization
> similar to what MacApp did), then you could simply override (not call)
> "init" for simple ivar initialization in a subclass, which would in no way
> interfere with a d
in no way
interfere with a designated initializer. Since they don't all call it, it's
really academic.
On 2/11/10 6:52 PM, "cocoa-dev-requ...@lists.apple.com"
wrote:
> Message: 2
> Date: Thu, 11 Feb 2010 12:18:55 -0800
> From: mmalc Crawford
> Subject: Re: What
On Feb 11, 2010, at 12:08 pm, Gordon Apple wrote:
> My point was that if you could count on "init" being called internally and
> all you needed was to initialize some ivars, you could override "init" and
> not have to override the (sometimes more involved) designated initializer
> and possibly ot
My point was that if you could count on "init" being called internally and
all you needed was to initialize some ivars, you could override "init" and
not have to override the (sometimes more involved) designated initializer
and possibly other initializers. You could still use the (superclass)
desi
On Feb 11, 2010, at 9:03 AM, Gordon Apple wrote:
> It's unfortunate that all initializers don't at least call "init"
> internally. That would make subclassing easier if all one needs is to set a
> few ivars. In the earlier days of MacApp (Pascal and first C++ versions)
> there was a basic initial
> ...but it still would have been useful, sometimes
> eliminating the need to override multiple initializers.
Are you missing the point of the designated initializer? Or have you dealt
with classes that did not have one, or did not use it properly?
--
Scott Ribe
scott_r...@killerbytes.com
http:/
On 2/10/2010 8:38 PM, Quincey Morris wrote:
On Feb 10, 2010, at 12:23 PM, James Walker wrote:
I think at times I've written things like [[NSMutableArray alloc]
init] with no apparent ill effects, but now I notice that the docs for
NSMutableArray and NSArray don't say that there is an init metho
It's unfortunate that all initializers don't at least call "init"
internally. That would make subclassing easier if all one needs is to set a
few ivars. In the earlier days of MacApp (Pascal and first C++ versions)
there was a basic initializer, similar to "init", called by all classes,
just for
On Feb 10, 2010, at 12:23 PM, James Walker wrote:
> I think at times I've written things like [[NSMutableArray alloc] init] with
> no apparent ill effects, but now I notice that the docs for NSMutableArray
> and NSArray don't say that there is an init method. The NSObject docs say
> that an in
True.
But most classes have designated initializers that configure the class
properly. They should be documented, although typically they’re used for
subclassing the class.
On Feb 10, 2010, at 3:49 PM, Henry McGilton (Boulevardier) wrote:
>
> On Feb 10, 2010, at 12:23 PM, James Walker wrote:
On Feb 10, 2010, at 12:23 PM, James Walker wrote:
> I think at times I've written things like [[NSMutableArray alloc] init] with
> no apparent ill effects, but now I notice that the docs for NSMutableArray
> and NSArray don't say that there is an init method. The NSObject docs say
> that an i
I think at times I've written things like [[NSMutableArray alloc] init]
with no apparent ill effects, but now I notice that the docs for
NSMutableArray and NSArray don't say that there is an init method. The
NSObject docs say that an init method might raise an exception. Is
there some other i
18 matches
Mail list logo