• 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: RS: NSObject members class and isMemberOfClass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: NSObject members class and isMemberOfClass


  • Subject: Re: RS: NSObject members class and isMemberOfClass
  • From: Chris Suter <email@hidden>
  • Date: Sat, 8 Sep 2007 00:17:16 +1000


On 07/09/2007, at 11:15 PM, Finlay Dobbie wrote:

There isn't any supported way of determining if an array is mutable or
not. You probably could do it using undocumented private
CoreFoundation functions, but you shouldn't really need to.

There are no private functions in CoreFoundation that you can use. For purely academic purposes (not to be used in production code) the following will tell you if an array happens to be mutable.


@interface NSArray (IsMutable)

- (BOOL)isMutable;

@end

@implementation NSArray (IsMutable)

- (BOOL)isMutable
{
  return ((unsigned short *)self)[2] & 3 ? YES : NO;
}

@end

- Chris

_______________________________________________

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: 
 >RS: NSObject members class and isMemberOfClass (From: Roland Silver <email@hidden>)
 >Re: RS: NSObject members class and isMemberOfClass (From: Mike Abdullah <email@hidden>)
 >Re: RS: NSObject members class and isMemberOfClass (From: "Finlay Dobbie" <email@hidden>)

  • Prev by Date: Re: Waiting for a USB device to connect
  • Next by Date: Re: characters in cocoa
  • Previous by thread: Re: RS: NSObject members class and isMemberOfClass
  • Next by thread: Re: RS: NSObject members class and isMemberOfClass
  • Index(es):
    • Date
    • Thread