• 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: Function overloading for ObjC classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function overloading for ObjC classes


  • Subject: Re: Function overloading for ObjC classes
  • From: Charles Srstka <email@hidden>
  • Date: Sun, 22 Feb 2004 12:57:43 -0600

I think the reason for this problem is that the object you're using isn't really an NSData or an NSMutableData - it's going to be something like an NSCFData or something similar. NSString, NSArray, and the other class clusters work like this. The -(id)init methods on NSData is going to go initialize some subclass and then return that. The thing is that as far as I am aware mutability is implemented as an option on all these classes, so when you make an NSData and an NSMutableData, you could get two objects which are actually of the same class, but one of them has the mutability option set, and the other one will throw exceptions if you try to use its setters or any other method that would modify it.

Charles
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Function overloading for ObjC classes (From: Ondra Cada <email@hidden>)
 >Re: Function overloading for ObjC classes (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Function overloading for ObjC classes
  • Next by Date: Re: Best Cocoa/Objective-C Book?
  • Previous by thread: Re: Function overloading for ObjC classes
  • Next by thread: Re: Function overloading for ObjC classes
  • Index(es):
    • Date
    • Thread