• 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: email@hidden
  • Date: Sat, 4 May 2002 20:17:19 -0400

I think it was a problem with the framework. I moved the category into the application itself, and now it seems to be working fine. Sorry to trouble you.

On another note, does anyone know what header I need to include to use zlib? I'm pretty sure I remember that it is included in Mac OS X (correct me if I'm wrong), but I can't find a framework for it as there was in Public Beta.

Owen Anderson

On Saturday, May 4, 2002, at 07:58 PM, Shawn Erickson wrote:


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: Charles Srstka <email@hidden>
References: 
 >Re: Categories (From: Shawn Erickson <email@hidden>)

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