NSConstantString?
NSConstantString?
- Subject: NSConstantString?
- From: "Dr. H. Nikolaus Schaller" <email@hidden>
- Date: Tue, 22 Apr 2003 23:14:11 +0200
Dear all,
I am trying to modify the NSString class cluster (for educational
purposes) and have some success.
But I constantly get an "interface `NSConstantString' lacks required
ivars" error.
There is an article at
http://developer.apple.com/techpubs/macosx/DeveloperTools/gcc3/gcc/
Constant-string-objects.html
that says, the instance variables are:
@interface NXConstantString : Object
{
char *c_string;
unsigned int len;
}
@end
but that seems to be valid for NXConstantString only (which is the
standard gcc default). Apple gcc in the developer tools
seems to default to NSConstantString.
Runtime browser suggests to use
@interface NSSimpleCString : NSString
{
char *bytes;
unsigned int numBytes;
}
But it gives the above mentioned error message.
My code is as follows:
@interface NSString : NSObject {
unichar *_data;
unsigned int _length;
BOOL _freeWhenDone;
int _hash;
}
@interface NSSimpleCString : NSString
{
char *bytes;
unsigned int numBytes;
}
@end
@interface NSConstantString : NSSimpleCString
{
}
@end
extern void *_NSConstantStringClassReference; // this also removes a
warning message
Any ideas, hints, thoughts? Many thanks,
Nikolaus
+-------------------+
! email@hidden !
+-------------------+
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.