Subclassing NSString
Subclassing NSString
- Subject: Subclassing NSString
- From: Brendan Younger <email@hidden>
- Date: Sat, 16 Jun 2001 01:51:58 -0500
I've been having some difficulties subclassing NSString. Using the code
that follows:
//ModelApp.h
@interface ModelAppObject : NSString
{
ProcessSerialNumber psn;
}
- (void)setPSN:(ProcessSerialNumber*)PSN;
@end
//Other.m
//also, char name[32] is a pascal string in case you were wondering...
[NSMutableArray addObject:[ModelAppObject stringWithCString:&(name[1])
length:name[0]]];
gives this run-time error:
-[ModelAppObject initWithBytes:length:encoding:]: selector not recognized
any ideas as to why?
Brendan Younger