mySTEP

Issue 550: methodSignatureForSelector vs. methodDescriptionForSelector

Reported by Nikolaus Schaller, Jan 14, 2014

Which of the following methods is 'basic' and forwarded to the peers 
and which is 'derived'?

It appears that DO always uses a remote methodDescriptionForSelector 
even to get a methodSignatureForSelector, so we must implement this 
method for local objects (so that a client can ask us).

But we must base it in top of - (NSMethodSignature *) 
methodSignatureForSelector:(SEL) aSelector because that one might be 
overwritten to implement -forwardInvocation (see documentation 
there).

So clear answer: 
* -methodSignatureForSelector: is the basic (and user-visible) 
method
* and we just must be prepared that a distant object might ask for 
-methodDescriptionForSelector:
* and we must translate the NSMethodSignature into a struct 
objc_method_description *

Created: 11 years 2 months ago by Nikolaus Schaller

Status: New

Owner: Nikolaus Schaller

Labels:
Type:Defect
Priority:High