On 26 Jun 2011, at 18:38, Jonathan Bartlett wrote:

> I have a category for NSString which defines a method "isEmpty".  However, I 
> am getting the following error:
> 
> GSCSubString (instance) does not recognize isEmpty.  Is this because this 
> class is not inheriting from NSString, or something else?

Which Objective-C runtime are you using?  There was a bug with older versions 
of the GNUstep runtime which occasionally caused categories that were loaded 
before the classes to get lost.

GSCSubString is a(n indirect) subclass of NSString, so a category on NSString 
should be working.  If it isn't, then it's a bug in either your compiler or the 
runtime.  Can you send this message to other string objects?  What happens if 
you do this:

[class_createInstance(objc_getClass("NSString")) isEmpty];

David

-- Sent from my Apple II


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to