Re: NSLog(@"%@",[NSProxy class]);
Re: NSLog(@"%@",[NSProxy class]);
- Subject: Re: NSLog(@"%@",[NSProxy class]);
- From: Agent M <email@hidden>
- Date: Sat, 11 Mar 2006 19:54:26 -0500
The issue is not over NSProxy but over its meta-class, which is indeed
so crippled it can't even return its own description. Why shouldn't the
meta-class be a full-blown object like all others?
On Mar 11, 2006, at 7:30 PM, Greg Herlihy wrote:
NSProxy is not "broken". NSProxy happens to be an abstract class -
which
means first - it must be subclassed before it can be used; and second -
there are certain methods which a subclass of NSProxy must implement.
As it
happens, NSProxy has two such methods - methodSignatureForSelector is
one of
them (forwardInvocation: is the other).
And in fact all that an NSProxy subclass's methodSignatureForSelector
does
in most cases is simply to forward the call to the object being proxied
(stored as a "realObject" instance variable in the example below):
– (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
return [realObject methodSignatureForSelector:aSelector];
}
And all of this information about NSProxy is easily found in the
Foundation
Reference for Objective-C documentation.
Greg
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
AgentM
email@hidden
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden