Re: unrecognized selector sent to instance
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