[OGo-GNUstep-Port] stringByReplacingString: withString: -> FIXME

Helge Hess gnustep-port@opengroupware.org
Tue, 15 Mar 2005 14:55:37 +0100


On Mar 15, 2005, at 14:53, Stefan Huehner wrote:
> Logic/LSSearch/LSBaseSearch.m
>
> #if LIB_FOUNDATION_LIBRARY
>     val = [val stringByReplacingString:@"'" withString:@""];
> #else
> #  warning FIXME: incorrect implementation for this Foundation library!
> #endif
>
> I'm searching for an easy and maintainable way to fix these. In 
> sope-core/NGExtension/ i noticed several method which are added to 
> i.e. NSString.
> When we would add stringByReplacingString: withString: there we could 
> transparently use it everywhere else, without cluttering the whole 
> codebase with #if's.

Yes. Actually I think NGExtension already provides a method for the 
above thing. Note that the code is also supposed to work on Cocoa, so 
you can remove the #if only if you already have tested code for that 
Foundation.

But take care not to aggressivly remove #ifdef'ed things which you 
"think" are correct without testing. There are minor differences/bugs 
in all Foundations which might need to get worked around. (though I 
have no example in my mind)

Greets,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org