gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with services (DO ?) with svn trunk


From: David Chisnall
Subject: Re: Problem with services (DO ?) with svn trunk
Date: Tue, 17 Aug 2010 15:54:06 +0100

On 17 Aug 2010, at 15:21, Philippe Roussel wrote:

> This seems to come from NSPerformService in GSServicesManager.m line
> 1717 : selName is "makeThumbnail:userData:error:" and
> NSSelectorFromString(selName) return 0.

This function should not be returning 0 with a valid string, and is a simple 
wrapper around the lower-level runtime function.  

I /think/ that the problem is that NSSelectorFromString() wraps 
GSSelectorFromName() (for irrelevant legacy reasons - this indirection can 
probably be deleted now), which calls sel_getUid(), not sel_registerName().  
The former function returns 0 when the selector is not already in the selector 
table.  The latter always returns a valid selector.

I believe that the correct fix is modifying NSSelectorFromString() to use 
sel_registerName() and replace all other references to GSSelectorFromName() 
with sel_registerName. The not-quite-so-correct fix is to modify 
GSSelectorFromName() to call sel_registerName().

David

--
This email complies with ISO 3103


reply via email to

[Prev in Thread] Current Thread [Next in Thread]