[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: KVC
From: |
Helge Hess |
Subject: |
Re: KVC |
Date: |
Tue, 29 May 2007 11:31:48 +0200 |
On May 29, 2007, at 11:17, Richard Frith-Macdonald wrote:
Hi Helge, It's not clear to me what the problem is with -
setNilValueForKey:
The Apple documentation at http://developer.apple.com/documentation/
Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/
Reference/Reference.html#//apple_ref/occ/instm/NSObject/
setNilValueForKey:
says that 'The default implementation raises an
NSInvalidArgumentException'
Are you saying that the Apple implementation does not do what the
documentation says?
Well, I don't have the time to properly reproduce the exact issues,
but I think Cocoa has a Compatibility mode for classes which do
implement -takeValue:forKey:.
Which also involves (overrides) -setNilValueForKey:.
I assume the documentation is correct if you use new-style KVC, but
for old-style code (probably the far majority of existing code!) an
possibly undocumented Compat mode kicks in.
Greets,
Helge
PS: of course we should also update OGo to implement the new API, but
thats quite a few places to fix.
--
Helge Hess
http://www.helgehess.eu/
- KVC, Helge Hess, 2007/05/28
- Re: KVC, Nicola Pero, 2007/05/28
- Re: KVC, Helge Hess, 2007/05/29
- Re: KVC, Richard Frith-Macdonald, 2007/05/29
- Re: KVC,
Helge Hess <=
- Re: KVC, Chris Farber, 2007/05/29
- Re: KVC, Helge Hess, 2007/05/29
- Re: KVC, Helge Hess, 2007/05/31