discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSArray cluster class membership


From: Marco Scheurer
Subject: Re: NSArray cluster class membership
Date: Sun, 14 Mar 2004 11:15:22 +0100


On Mar 14, 2004, at 8:24 AM, David Ayers wrote:

Alex Perez wrote:
Hello list,

I was browsing the "Porting OGo to MacOSX" page at
http://www.opengroupware.org/en/projects/macosx/ where I found:
"on Cocoa we cannot find out whether an array is mutable - affects
NGObjWeb and is hacked around using NS_DURING".
In the interim, can you just rip out GNUstep-base's NSArray, rename it to
GSArray or anything else, and use that instead of OS X's NSArray?

Could someone enlighten me, why respondsToSelector:@selector(addObject:) wouldn't work?


On Cocoa you mean?

For the same reason why isMemberOfClass: and isKindOfClass: are broken. NSArray (or more accurately its concrete subclasses) are implemented using CFArray, which is also used for NSMutableArray, and implements -addObject:. Sending addObject to an NSArray results in a runtime error, but the object responds to the message.

marco



Marco Scheurer
Sen:te, Lausanne, Switzerland   http://www.sente.ch





reply via email to

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