• 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: No sure way to tell whether an array is mutable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No sure way to tell whether an array is mutable?


  • Subject: Re: No sure way to tell whether an array is mutable?
  • From: Sam DeVore <email@hidden>
  • Date: Thu, 25 Jan 2007 20:07:20 -0700

I've been known to get this when I do a copy instead of mutableCopy


On Jan 25, 2007, at 8:02 PM, Jeff C wrote:

If an object says that a return value is an NSMutableArray and you get back an NSArray, then something is broken. You can't even claim polymorphism, since a superclass cannot masquerade as a subclass.

I think your problem lies elsewhere.

I have been known to lose my brains and do this:

NSMutableArray *theArray=[[NSArray alloc] init];

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >No sure way to tell whether an array is mutable? (From: Kenny Leung <email@hidden>)
 >Re: No sure way to tell whether an array is mutable? (From: Jeff C <email@hidden>)

  • Prev by Date: Re: No sure way to tell whether an array is mutable?
  • Next by Date: Re: Redrawing in a custom NSView.
  • Previous by thread: Re: No sure way to tell whether an array is mutable?
  • Next by thread: NSTableView, validateDrop: not called on same row
  • Index(es):
    • Date
    • Thread