• 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 15:33:32 -0700

On Saturday, May 4, 2002, at 03:03 PM, email@hidden wrote:

I've created a category of NSMutableData, compiled it into a framework, and am now trying to use it in an application. I've imported the header file from the framework, and the application compiles fine. But when I try to run it, I get these errors:

2002-05-04 18:01:34.507 Compressor[4006] *** -[NSConcreteMutableData bzip2]: selector not recognized
2002-05-04 18:01:34.531 Compressor[4006] *** -[NSConcreteMutableData bzip2]: selector not recognized

What's up with that? I thought I could just use the selectors added by my category as if they were normal ones. Am I supposed to do something special?

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.

For more on the class cluster pattern see...
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
Foundation/Concepts/ClassClusters.html

-Shawn
_______________________________________________
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: Ondra Cada <email@hidden>
References: 
 >Categories (From: email@hidden)

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