• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mutable Convenience Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mutable Convenience Methods


  • Subject: Re: Mutable Convenience Methods
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 20 Feb 2008 17:50:05 +0100


Le 20 févr. 08 à 17:20, Jonathon Mah a écrit :

Hi,

I'm wondering if there's agreement on this before I submit it as a bug:

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?



Jonathon Mah
email@hidden


According to the documentation, +defaultParagraphStyle returns an NSParagraphStyle *. The return value is explicitly not mutable.
+string, +array, +dictionary and friends return id, that is an instance of the caller class (by convention).


You may fill an enhancement request and ask a +mutableDefaultParagraphStyle method , but I don't think we can considere the present behavior as a bug.

_______________________________________________

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


References: 
 >Mutable Convenience Methods (From: Jonathon Mah <email@hidden>)

  • Prev by Date: Re: Mutable Convenience Methods
  • Next by Date: Re: NSStringFromClass versus className ?
  • Previous by thread: Re: Mutable Convenience Methods
  • Next by thread: Re: Mutable Convenience Methods
  • Index(es):
    • Date
    • Thread