gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: Recent key-value encoding changes to NSObject.


From: Manuel Guesdon
Subject: Re[2]: Recent key-value encoding changes to NSObject.
Date: Fri, 22 Feb 2002 17:13:41 +0100 (CET)

Hi,

On Thu, 14 Feb 2002 16:19:19 +0000 Richard <address@hidden> wrote:

 >| Manuel Guesdon wrote:
 >| > 
 >| > Hi,
 >| > 
 >| > Is it possible to make these 2 functions public (or at least not static) ?
 >| >         static void GSSetValue(NSObject *self, NSString *key, id val, SEL 
 >sel, const char *type, unsigned size,
 >| unsigned off);
 >| >         static id GSGetValue(NSObject *self, NSString *key, SEL sel; 
 >const char *type, unsigned size, unsigned
 >| off)
 >| 
 >| 
 >| I was thinking about that ... and had thought it might make sense to
 >| provide
 >| some variant of them.
 >| 
 >| I was also considering changing the api of the existing ivar access
 >| methods to
 >| make them more efficient by using cStrings.
 >| But I'm not sure whether non-ascii characters will ever be valid in
 >| selector
 >| and variable names.

Sorry, I was at Fosdem sunday morning but not sunday afternoon (I've planned to 
visit the city with my girlfriend :-)
I've seen NSObject has changed but found nothing about accessing GS[GS]etValue 
externally. Is it possible to have this
kind of thing soon ?



 >| > BTW, as KVC in GNUstep is in core not in EOF, there's actually some 
 >missing parts in core: NSarray, NSDictionary
 >| and NSMutableDictionary
 >| > implements valueForKey:
 >| > Is it possible to add this to base so this part will be complete and 
 >NSArray/NSDictionary will be conform to
 >| specs ?
 >| 
 >| Surely ... if there's anything missing I'd consider it a bug.

Here are additional methods :
NSObject :
        - (void)takeStoredValue:value forKeyPath:(NSString *)key
        - (void)takeStoredValuesFromDictionary:(NSDictionary *)dictionary
        - (NSDictionary *)valuesForKeyPaths:(NSArray *)keyPaths

NSArray:
        - (id)valueForKey:(NSString *)key
        - (id)computeSumForKey:(NSString *)key
        - (id)computeAvgForKey:(NSString *)key
        - (id)computeCountForKey:(NSString *)key
        - (id)computeMaxForKey:(NSString *)key
        - (id)computeMinForKey:(NSString *)key

NSDictionary:
        - (id)valueForKey:(NSString *)key
        - (id)storedValueForKey:(NSString *)key
        -(id)valueForKeyPath:(NSString*)keyPath

 NSMutableDictionary:
        - (void)takeValue:(id)value forKey:(NSString *)key
        - (void)takeStoredValue:(id)value forKey:(NSString *)key

How can we integrate them into base ?


Additionaly, there some new methods in Apple doc but I haven't code for them:
        NSArray 
(http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSArray.html)
                 - exchangeObjectAtIndex:withObjectAtIndex:
                Operators related methods (I think they are related to 
computeXXXForKey:(NSString *)key)
                        
http://developer.apple.com/techpubs/webobjects/WebObjects_5/FoundationRef/Java/Classes/NSArray.html
                        
http://developer.apple.com/techpubs/webobjects/WebObjects_5/FoundationRef/Java/Classes/NSArray.html#//apple_ref/java/clm/NSArray/setOperatorForKey
                        
http://developer.apple.com/techpubs/webobjects/WebObjects_5/FoundationRef/Java/Interfaces/NSArrayOperator.html#BCEJIJAI


Manuel
--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <address@hidden>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0999  -  Fax: +33 1 4940 0998




reply via email to

[Prev in Thread] Current Thread [Next in Thread]