• 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: unrecognized selector sent to instance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unrecognized selector sent to instance


  • Subject: Re: unrecognized selector sent to instance
  • From: Jason Stephenson <email@hidden>
  • Date: Wed, 15 Apr 2009 11:13:19 -0400

Thanks, Bill.

I did read the documentation, and in the very documents you point out it says:

To create a subclass of NSOutputStream you may have to implement initializers for the type of stream data supported and suitably reimplement existing initializers. You must also provide complete implementations of the following methods:

And in the NSStream class reference:

NSStream is an abstract class for objects representing streams. Its interface is common to all Cocoa stream classes, including its concrete subclasses NSInputStream and NSOutputStream.

Which I take to mean that NSInputStream and NSOutputStream are concrete classes. They are, I suppose, part of a class cluster.

Originally, I wrote the code without overriding any methods other than those specified in the subclassing notes. However, I decided that it would be easier if I overrode some of the other methods and did initialization of ivars, etc. in the typical places. I made those changes before trying the code.

I have two ideas that may fix this:

One is to go back to the original implementation and initialize everything the first time that -[write:maxLength:] is called.

Two is to add a NSOutputStream ivar and initialize/write to that.

The latter is what's recommended for class clusters, correct?

Jason
_______________________________________________

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: 
 >unrecognized selector sent to instance (From: Jason Stephenson <email@hidden>)
 >Re: unrecognized selector sent to instance (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: unrecognized selector sent to instance
  • Next by Date: Re: unrecognized selector sent to instance
  • Previous by thread: Re: unrecognized selector sent to instance
  • Next by thread: Re: unrecognized selector sent to instance
  • Index(es):
    • Date
    • Thread