]> err.no Git - sope/blobdiff - sope-core/EOControl/EOKeyValueCoding.m
fixed OSX installdir
[sope] / sope-core / EOControl / EOKeyValueCoding.m
index 273717fcaa424b39f9970dc8c1bba1dcaa7a78ec..02976c4fd330688b0e754bd7cb592c1687624763 100644 (file)
@@ -807,8 +807,8 @@ static inline BOOL setValue(NSString* key, id instance, id value)
   if (StringClass == Nil) StringClass = [NSString class];
   value = self;
   
-  buf = [_keyPath cString];
-  if (index(buf, '.') == NULL)
+  buf = (const unsigned char *)[_keyPath cString];
+  if (index((const char *)buf, '.') == NULL)
     /* no point contained .. */
     return [self valueForKey:_keyPath];
   
@@ -818,7 +818,8 @@ static inline BOOL setValue(NSString* key, id instance, id value)
       NSString *key;
       
       key = (start < i)
-        ? [StringClass stringWithCString:&(buf[start]) length:(i - start)]
+        ? [StringClass stringWithCString:(const char *)
+                      &(buf[start]) length:(i - start)]
         : @"";
       
       if ((value = [value valueForKey:key]) == nil)
@@ -832,7 +833,8 @@ static inline BOOL setValue(NSString* key, id instance, id value)
     NSString *key;
     
     key = (start < i)
-      ? [StringClass stringWithCString:&(buf[start]) length:(i - start)]
+      ? [StringClass stringWithCString:(const char *)
+                    &(buf[start]) length:(i - start)]
       : @"";
     return [value valueForKey:key];
   }
@@ -1034,7 +1036,7 @@ static inline BOOL setValue(NSString* key, id instance, id value)
   //[self handleTakeValue:_value forUnboundKey:_key];
 }
 
-- (id)valueForKey:(id)_key {
+- (id)valueForKey:(NSString *)_key {
   id obj;
   
   if (_key == nil) // TODO: warn about nil key?
@@ -1057,7 +1059,7 @@ static inline BOOL setValue(NSString* key, id instance, id value)
   [self addEntriesFromDictionary:dictionary];
 }
 
-- (void)takeValue:(id)_value forKey:(id)_key {
+- (void)takeValue:(id)_value forKey:(NSString *)_key {
   if (_value == nil) _value = [NSNull null];
   [self setObject:_value forKey:_key];
 }