Index: GDL2/EOControl/EOKeyValueCoding.m
===================================================================
--- GDL2/EOControl/EOKeyValueCoding.m	(revision 26235)
+++ GDL2/EOControl/EOKeyValueCoding.m	(working copy)
@@ -362,6 +362,9 @@
       && [keyPath isEqualToString: @"@count"] == NO
       && r.location != NSNotFound)
     {
+#if NEW_STYLE_KVC
+      r.length = 0;
+#else
       NSRange rr;
       unsigned length;
 
@@ -372,6 +375,7 @@
       r = [keyPath rangeOfString: @"." 
 		   options: 0
 		   range: rr];
+#endif
     }
     
   if (r.length == 0)
@@ -417,7 +421,11 @@
       for (i=0; i<count; i++)
         {
           left = result;
+#if NEW_STYLE_KVC
+          right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKeyPath: key] decimalValue];
+#else
           right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue];
+#endif
           NSDecimalAdd(&result, &left, &right, mode);
         }
     };
@@ -455,7 +463,11 @@
       for (i=0; i<count; i++)
         {
           left = result;
+#if NEW_STYLE_KVC
+          right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKeyPath: key] decimalValue];
+#else
           right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue];
+#endif
           NSDecimalAdd(&result, &left, &right, mode);
         }
     }
@@ -506,12 +518,20 @@
       for(i=0; i<count && (resultVal == nil || resultVal == GDL2_EONull); i++)
 	{
 	  result    = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
-	  resultVal = [result valueForKey: key];
+#if NEW_STYLE_KVC
+            resultVal = [result valueForKeyPath: key];
+#else
+            resultVal = [result valueForKey: key];
+#endif
 	}          
       for (; i<count; i++)
 	{
 	  current    = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
-	  currentVal = [current valueForKey: key];
+#if NEW_STYLE_KVC
+            currentVal = [current valueForKeyPath: key];
+#else
+            currentVal = [current valueForKey: key];
+#endif
 
 	  if (currentVal == nil || currentVal == GDL2_EONull)
             continue;
@@ -549,12 +569,20 @@
       for(i=0; i<count && (resultVal == nil || resultVal == GDL2_EONull); i++)
 	{
 	  result    = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
-	  resultVal = [result valueForKey: key];
+#if NEW_STYLE_KVC
+            resultVal = [result valueForKeyPath: key];
+#else
+            resultVal = [result valueForKey: key];
+#endif
 	}          
       for (; i<count; i++)
 	{
 	  current    = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
-	  currentVal = [current valueForKey: key];
+#if NEW_STYLE_KVC
+            currentVal = [current valueForKeyPath: key];
+#else
+            currentVal = [current valueForKey: key];
+#endif
 
 	  if (currentVal == nil || currentVal == GDL2_EONull) continue;
 
@@ -585,6 +613,8 @@
 			@selector(GDL2KVCNSDictionaryICategoryID), YES);
 }
 
+#if !NEW_STYLE_KVC
+
 /**
  * Returns the object stored in the dictionary for this key.
  * Unlike Foundation, this method may return objects for keys other than
@@ -692,6 +722,8 @@
   return value;
 }
 
+#endif
+
 /**
  * First checks whether the entire keyPath is contained as a key
  * in the receiver before invoking super's implementation.
