discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSCell objectValue


From: Andreas Hoeschler
Subject: Re: NSCell objectValue
Date: Tue, 27 Jul 2004 12:18:30 +0200

Hi Dirk,

I was mentioning this problem here about one year ago, and Adam told me
that this was the correct behaviour as documented by Apple:

**
To be valid, the receiver must have a formatter capable of converting
the object to and from its textual representation.
**

I don't like this either, because if you intend to use string values,
you need a dummy formatter that just passes the value.  I couldn't
really believe Cocoa's behaviour was like this, but I don't have access
to a Cocoa machine, so I couldn't verify it.

I have, and this is definitely wrong. If no formatter is set, the objectValue implementation of Cocoa simply uses stringValue to determine the return value. Returning nil makes only sense, if a formatter is set. I have corrected the GNUstep behaviour with a category, but I suggest to commit this change to the cvs.

Regards,

   Andreas






reply via email to

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