• 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: Categories
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Categories


  • Subject: Re: Categories
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 4 May 2002 16:58:23 -0700

On Saturday, May 4, 2002, at 03:44 PM, Ondra Cada wrote:

On Sunday, May 5, 2002, at 12:33 , Shawn Erickson wrote:

I haven't looked into NSMutableData myself but it is most likely part of a class cluster. In a nut shell this means that when you use init an NSMutableData object you get back a different type of object that supports the same public messages that NSMutableData defines. So you category is against NSMutableData not NSConcreteMutableData which appears to be what you are really operating on when you attempt to send the bzip2 message.

Also, NSConcreteMutableData is a subclass of NSMutableData, and thus it inherits all NSMutableData methods, including those of categories.

There is absolutely no problem with clusters and categories; you need to be cautious only when subclassing.

Yeah, that is true.

I wasn't sure if NSConcreteMutableData was a sub-class of NSMutableData or not (it doesn't have to be). I figure it should be but what Owen listed, assuming his category is correctly "attached"[1] to NSMutableData, points to that fact it may not be.

Anyway, if it is a sub-class of NSMutableData then something is wrong with your category.

Owen, how about a code snippet?


-Shawn

[1] What is the generally accepted term for the applying of a category to a class?
_______________________________________________
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.
  • Follow-Ups:
    • Re: Categories
      • From: email@hidden
    • Re: Categories
      • From: Nat! <email@hidden>
References: 
 >Re: Categories (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Getting File Sizes
  • Next by Date: Re: Categories
  • Previous by thread: Re: Categories
  • Next by thread: Re: Categories
  • Index(es):
    • Date
    • Thread