bug-gnustep
[Top][All Lists]
Advanced

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

Re: objc_next_class


From: Nicola Pero
Subject: Re: objc_next_class
Date: Fri, 14 Jun 2002 09:30:06 +0100 (BST)

> >> I'm not sure what the original problem is, but just in case it's not
> >> obvious, the code would fail (as Nicola notes below) because it would
> >> raise an exception and crash as it iterates past the Object class -
> >> NSLog() uses the -description method to log the class 'cl', but Object
> >> does not respond ot that method. I don't know where Object would
> >> appear in the iterated list (I'd have expected it to be right at one
> >> end).
> >>
> >> Perhaps we should add a category of Object in GNUstep-base, to 
> >> implement
> >> -description for it?
> >
> > interesting idea :-)
> >
> > technically we also need to add respondsToSelector:
> >
> > I'm not sure what's best - maybe being able to remove Object and company
> > from libobjc would be the real solution :-)
> 
> I already added +description, -description and -respondsToSelector:
> 
> Removal of Object might be nice ... but we use Protocol, wo we would have to
> replace it with a version which inherits from NSObject.

Agreed.

It might not be trivial (also, in the runtime we have code which explicity
links in Object and NXConstString, and there might be other hidden
dependencies).

It's not for now, but it's maybe something we might want to think about in
the future.

It looks like from time to time someone stumbles upon these classes -
which for us are sort of a relict of the pre-OpenStep era :-) - and gets
bitten.




reply via email to

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