Re: Mutable Convenience Methods
Re: Mutable Convenience Methods
- Subject: Re: Mutable Convenience Methods
- From: j o a r <email@hidden>
- Date: Wed, 20 Feb 2008 17:56:23 +0100
On Feb 20, 2008, at 5:20 PM, Jonathon Mah wrote:
I think mutable subclasses should override the convenience methods
of their superclass to return a mutable version. For example,
[NSMutableArray array] and [NSMutableString string] both return
mutable versions, but [NSMutableParagraphStyle
defaultParagraphStyle] does not. Is this considered a bug in
NSMutableParagraphStyle?
The big difference between the API:s that you quote above is that
NSMutableArray and NSMutableString returns new instances, while
NSParagraphStyle returns a singleton, shared, instance. For this
reason, I don't think that this could be considered a bug, or that it
would make sense to have a similar method in NSMutableParagraphStyle.
j o a r
_______________________________________________
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