bugGNUstep - Bugs: bug #3986, NSObject...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #3986: NSObject methodSignatureForSelector should return nil on unknown sel

Submitted by:  Stefan Urbanek <stefanu>
Submitted on:  Sun 15 Jun 2003 07:01:47 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 20 Jun 2003 06:57:32 PM UTC, comment #1:

Fixed in cvs

Richard Frith-Macdonald <CaS>
Project Member
Sun 15 Jun 2003 07:01:47 AM UTC, original submission:

NSObject methodSignatureForSelector should return nil when method with given selector is not implemented in the object. Apple docs are not very clean about that (NSObject):

Returns an NSMethodSignature object that contains a description of the aSelector method, or nil if the aSelector method can’t be found.

However i think it has a reason to return nil. For example, in implementation of a delegating/rpoxy/forwarding:

- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
NSMethodSignature *sig;

sig = [super methodSignatureForSelector:aSelector];
if(!sig)
{
sig = [someDelegateOrDistant methodSignatureForSelector:aSelector];
}
return sig;
}

Very simple patch is attached.

Stefan Urbanek <stefanu>
Project Member

 

Attached Files
file #484:  NSObject-signature.patch added by stefanu (509B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 20 Jun 2003 06:57:32 PM UTCCaSStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1