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 are supplied do not make conceptual sense.

I'm wondering how to deal with overriding the 'init' method of NSObject. 
There's really no sensible default values that I could have init pass along to 
my designated initializer. It doesn't make sense for clients to call 'init' and 
I'm debating whether to return nil, throw some sort of exception, make the 
instance 'dead' and essentially do nothing, or to do something else..

Anyone have a recommendation for the best practice in this case?
-Andy

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to