[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re[4]: KVC bug
From: |
Richard Frith-Macdonald |
Subject: |
Re: Re[4]: KVC bug |
Date: |
Wed, 27 Feb 2002 15:57:39 +0000 |
On Wednesday, February 27, 2002, at 03:06 PM, Manuel Guesdon wrote:
| So, if you build with just GNUstep-base, you get the Apple Foundation
| behavior, and if you
| build with GNUstepWeb/EOF you get the Apple webobjects behavior.
|
| Of course, we should test this - but methods in categories *should*
| override the methods
| in the original class.
My god !
This really means that *just* linking or not with EOF (explicitely or
just because it's in the Makefile.preamble copied
from somewhere) will change the behaviour of valueForKey: for
dictionary ? Or even different objective C library (I
don't know where/how the category override is done).
This is standard behavior for categories - as each category is loaded at
runtime,
it overrides existing behaviors.
I think some people will have great moments trying to debug this. Let's
imagine a general bundle or a library for computing some
stats, wich can be used with or without EOF. A thing as simple as
valueForKey:@"count" may return a
different result. I imagine a discussion between a user of this bundle
and the developper:
- the user, I've fund some problem.
- the developper, could you provide me some small test code ?
- the user: here is one but, eh !, now it seems to work
- the developper: could you rebuild your entire projects, it should work
- the user: this still don't work but the test code works...
....
I know the problem come initialy from Apple's API but couldn't we use
my code and your code with a "Strict MacOSX API
compatible" #ifdef to select your code ? I generaly like compatibility
but not if this potentially mean completely
strange problems and hours or days of debugging
I'd suggest using a warning log if the non-macos action is taken
ie if we handle count etc specially.
Just for confirmation, you say your code is correct because you've made
a test or because cacoa documentation say
nothing about these special keys ?
I tested it on MacOS-X
- Re[4]: KVC bug, Manuel Guesdon, 2002/02/27
- Re: Re[4]: KVC bug,
Richard Frith-Macdonald <=