|
From: | Eric Wasylishen |
Subject: | KVC behaviour on accessor methods with unsupported types |
Date: | Tue, 18 Aug 2009 11:44:28 -0600 |
Hi, I noticed that if you have getter/setter methods with return/argument types not supported by KVC (for example, SEL), trying to get or set it using KVC throws an exception on GNUstep, while on OS X 10.5, valueForUndefinedKey: or setValue:forUndefinedKey: are called. I've attached a test program along with a patch for GNUstep base which changes the behaviour to match OS X. OS X 10.5 output: 2009-08-18 11:19:17.735 Collage[73996:813] setValue:forUndefinedKey: called 2009-08-18 11:19:17.737 Collage[73996:813] Test finished. GNUstep output: : Uncaught exception NSInvalidArgumentException, reason: key-value get method has unsupported type Aborted -Eric |
main.m
Description: Binary data
KVCPatch.patch
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |