Re: unrecognized selector sent to instance
Re: unrecognized selector sent to instance
- Subject: Re: unrecognized selector sent to instance
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 15 Apr 2009 08:02:06 -0700
On Apr 15, 2009, at 7:04 AM, Jason Stephenson wrote:
So, the error that I get at runtime makes it appear that my
SIGIOBzip2OutputStream does not respond to the -
[initToFileAtPath:append:] selector, but it does. In the debugger,
it looks as though SIGIOBzip2OutputStream's super class is the
object that doesn't respond to that selector. But, it's superclass
is NSOutputStream, and it is documented to respond to that selector
and I get no warnings about the selector when compiling.
Actually, it doesn't. A subclass of NSOutputStream responds to that
method.
NSStream/NSOutputStream are both abstract classes with very specific
subclassing notes.
See the documentation:
http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSOutputStream_Class/Reference/Reference.html
And:
http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSStream_Class/Reference/Reference.html#//apple_ref/occ/cl/NSStream
There is a very specific set of methods you need to override. -init
isn't one of them; you don't need to call super's implementation,
apparently.
b.bum
_______________________________________________
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