Inheritance issue with ivar on the iPhone
Posted
by Buffalo
on Stack Overflow
See other posts from Stack Overflow
or by Buffalo
Published on 2009-07-09T17:14:58Z
Indexed on
2010/05/28
3:21 UTC
Read the original article
Hit count: 299
iphone
|objective-c
I am using the BLIP/MYNetwork library to establish a basic tcp socket connection between the iPhone and my computer. So far, the code builds and runs correctly in simulator but deploying to device yields the following error:
error: property 'delegate' attempting to use ivar '_delegate' declared in super class of 'TCPConnection'
@interface TCPConnection : TCPEndpoint {
@private
TCPListener *_server;
IPAddress *_address;
BOOL _isIncoming, _checkedPeerCert;
TCPConnectionStatus _status;
TCPReader *_reader;
TCPWriter *_writer;
NSError *_error;
NSTimeInterval _openTimeout; }
/** The delegate object that will be called when the connection opens, closes or receives messages. */
@property (assign) id<TCPConnectionDelegate> delegate;
/** The delegate messages sent by TCPConnection. All methods are optional. */
@protocol TCPConnectionDelegate <NSObject>
@optional
/** Called after the connection successfully opens. */
- (void) connectionDidOpen: (TCPConnection*)connection;
/** Called after the connection fails to open due to an error. */
- (void) connection: (TCPConnection*)connection failedToOpen: (NSError*)error;
/** Called when the identity of the peer is known, if using an SSL connection and the SSL
settings say to check the peer's certificate.
This happens, if at all, after the -connectionDidOpen: call. */
- (BOOL) connection: (TCPConnection*)connection authorizeSSLPeer: (SecCertificateRef)peerCert;
/** Called after the connection closes. You can check the connection's error property to see if it was normal or abnormal. */
- (void) connectionDidClose: (TCPConnection*)connection;
@end
@interface TCPEndpoint : NSObject {
NSMutableDictionary *_sslProperties;
id _delegate;
}
- (void) tellDelegate: (SEL)selector withObject: (id)param;
@end
Does anyone know how I would fix this? Would I simply declare _delegate as a public property of the base class "TCPEndPoint"? Thanks for the help ya'll!
© Stack Overflow or respective owner