On Mar 25, 2008, at 8:09 PM, Quincey Morris wrote:
On Mar 25, 2008, at 16:26, Andy Lee wrote:
- (id)init
{
NSLog(@"%@ -- '%@' is not the designated initializer",
[self class],
NSStringFromSelector(_cmd));
[self release];
return nil;
}
Unless there is some special runtime magic
On 26/03/2008, at 11:09 AM, Quincey Morris wrote:
Unless there is some special runtime magic going on, this seems not
absolutely safe. Your '[self release]' is going to eventually lead
to a call of '[super dealloc]' and theoretically you can't safely
call the superclass's dealloc if you ha
On Mar 25, 2008, at 16:26, Andy Lee wrote:
A similar question was asked recently. To paraphrase (and slightly
correct) my reply:
I do essentially this:
- (id)init
{
NSLog(@"%@ -- '%@' is not the designated initializer",
[self class],
NSStringFromSelector(_cmd));
[self r
On Tue, Mar 25, 2008 at 6:01 PM, Andy Klepack
<[EMAIL PROTECTED]> wrote:
> Anyone have a recommendation for the best practice in this case?
Throw an exception. There's really nothing you can do at this point.
--Kyle Sluder
___
Cocoa-dev mailing list
A similar question was asked recently. To paraphrase (and slightly
correct) my reply:
I do essentially this:
- (id)init
{
NSLog(@"%@ -- '%@' is not the designated initializer",
[self class],
NSStringFromSelector(_cmd));
[self release];
return nil;
}
You can imagine
On Mar 25, 2008, at 15:01, Andy Klepack wrote:
I have a subclass of NSObject that provides its own designated
initializer that allows client code to configure an instance with
initial values. Instances of the class itself are immutable. At the
same time, instances where no initial values a