On 23 Jun 2009, at 04:54, Georg Fleischmann wrote:

Hi,

here is a fix for NSKeyValueCoding SetValueForKey() to prefer the key as is (without leading underscore) before trying with underscore (_key).

My problem: When loading a Nib file with a key named "infoPanel" for NSApplication, the value gets set to "_infoPanel" instead, which also exists in GNUstep.

I'm afraid your 'fix' is actually a request to introduce a bug. The order in which things are searched for is well defined (see http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/SearchImplementation.html) and the GNUstep implementation needs to stick to that ordering. I happen to think that the fact that KVC uses names with leading underscores is a design error by Apple, but it's the way things are.

It seems to me that the problem is the choice of key or the choice of ivar name, and any fix should be made at one of those rather than changing the KVC mechanism.


_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to