Re: [MyClass class] returning superclass's class
Re: [MyClass class] returning superclass's class
- Subject: Re: [MyClass class] returning superclass's class
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 20 Nov 2008 12:44:34 +0100
As I said, NSCharacterSet is a class cluster, you cannot subclass it
as you do for simple classes.
Le 20 nov. 08 à 11:37, Ken Tozier a écrit :
@interface KOptionString : NSCharacterSet
{
}
@end
KOptionString *whiteTest = [KOptionString whitespaceCharacterSet],
*hexTest = [KOptionString characterSetWithCharactersInString:
@"0123456789abcdefABCDEFxX"];
NSLog(@"whiteTest %@", [whiteTest class]);
NSLog(@"hexTest %@", [hexTest class]);
whiteTest result -> NSBuiltinCharacterSet
hexTest result -> NSCFCharacterSet
On Nov 19, 2008, at 8:48 AM, Andy Lee wrote:
Works for me:
@interface MyClass : NSCharacterSet
@end
@implementation MyClass
@end
...
NSLog(@"[MyClass class] returns [%@]", [MyClass class]);
2008-11-19 08:44:27.891 Scratch2[24671:10b] [MyClass class] returns
[MyClass]
Can you post some code?
--Andy
_______________________________________________
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
_______________________________________________
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