I have a base class that implements some class methods. It's using the class name to infer what resource it is and remotely fetch it.
@implementation BaseResource : CPObject
+ (id)find:(CPString)identifier
{
}
I'd like to be able to invoke the class methods from an instance method like
- (id)initWithCoder:(CPCoder)aCoder
{
[self find:1]; // This does not work
[BaseResource find:1]; // This works but will not resolve to the right resource name
}
I don't want to use the BaseResource class name because it needs to work for subclass with different names.
How do you invoke a class method from an instance method without explicitly using the class name?