Up
Authors
- Mircea Oancea (
mircea@jupiter.elcom.pub.ro
)
-
- Mirko Viviani (
mirko.viviani@gmail.com
)
-
- Manuel Guesdon (
mguesdon@oxymium.net
)
-
- David Ayers (
ayers@fsfe.org
)
-
Copyright: (C)
1996-2002,2003,2004,2005 Free Software
Foundation, Inc.
- Declared in:
- EOControl/EOKeyValueCoding.h
Description forthcoming.
Method summary
- (id)
computeAvgForKey: (NSString*)key;
Iterates over the objects of the receiver send
each object valueForKey: with the parameter. The
decimalValue of the returned object is
accumalted and then divided by number of objects
contained by the receiver as returned by
NSArray count
. An empty array returns
NSDecimalNumber 0.
- (id)
computeCountForKey: (NSString*)key;
Description forthcoming.
- (id)
computeMaxForKey: (NSString*)key;
Description forthcoming.
- (id)
computeMinForKey: (NSString*)key;
Description forthcoming.
- (id)
computeSumForKey: (NSString*)key;
Iterates over the objects of the receiver send
each object valueForKey: with the parameter. The
decimalValue of the returned object is
accumalted. An empty array returns
NSDecimalNumber 0.
- (id)
valueForKey: (NSString*)key;
EOKeyValueCoding protocol
This
overrides NSObjects implementation of this
method. Generally this method returns an array of
objects returned by invoking
[NSObject -valueForKey:]
for each item in the receiver, substituting EONull for
nil
. Keys formated like
"@function.someKey" are resolved by
invoking
NSArray compute Function WithKey:
"someKey" on the receiver. If the
key
is omitted, the function will be called with
nil
. The following functions are
supported by default:
Computational components generally expect a
key to be passed to the function. This is
not mandatory in which case 'nil' will be supplied.
(i.e. you may use "@myFuncWhichCanHandleNil" as a
key.) As a special case the
key
"count" does not actually invoke
computeCountForKey: on receiver but
returns the number of objects of the receiver.
There is no special handling of EONull.
Therefore expect exceptions on EONull not
responding to decimalValue and compare: when the
are used with this mechanism.
- (id)
valueForKeyPath: (NSString*)keyPath;
EOKeyValueCoding protocol
Returns
the object returned by invoking
[NSObject -valueForKeyPath:]
on the object returned by invoking
[NSObject -valueForKey:]
on the receiver with the first key component supplied by the key path, with rest of the key path.
If the first component starts with "@", the first component includes the key of the computational key component and as the form "@function.key". If there is only one key component, this method invokes
[NSObject -valueForKey:]
in the receiver with that component. Unlike the reference implementation GDL2 allows you to continue the
keyPath in a meaningful way after @count but the path must then contain a key as the computational key structure implies. (i.e. you may use "@count.self.decimalValue") The actual key "self" is in fact ignored during the computation, but the formal structure must be maintained.
It should be mentioned that the reference implementation would return the result of "@count" independent of any additional key paths, even if they were meaningless like "@count.bla.strange". GDL2 will raise, if the object returned by valueForKey:@"count.bla" (which generally is an NSDecimalNumber) raises on valueForKey:@"strange".
- Declared in:
- EOControl/EOKeyValueCoding.h
Description forthcoming.
Method summary
- (id)
storedValueForKey: (NSString*)key;
- (id)
storedValueForKeyPath: (NSString*)keyPath;
First checks whether the entire keyPath is
contained as a key in the receiver before
invoking super's implementation. (The special
quoted key handling will probably be moved to a
GSWDictionary subclass to be used by
GSWDisplayGroup.)
- (id)
valueForKey: (NSString*)key;
Returns the object stored in the dictionary for
this key. Unlike Foundation, this method
may return objects for keys other than those explicitly
stored in the receiver. These special keys are
'count', 'allKeys' and 'allValues'. We override
the implementation to account for these special keys.
- (id)
valueForKeyPath: (NSString*)keyPath;
First checks whether the entire keyPath is
contained as a key in the receiver before
invoking super's implementation. (The special
quoted key handling will probably be moved to a
GSWDictionary subclass to be used by
GSWDisplayGroup.)
- Declared in:
- EOControl/EOKeyValueCoding.h
Description forthcoming.
Method summary
- (void)
takeValue: (id)value
forKey: (NSString*)key;
Description forthcoming.
- Declared in:
- EOControl/EOKeyValueCoding.h
Description forthcoming.
Method summary
- (void)
smartTakeValue: (id)object
forKey: (NSString*)key;
Description forthcoming.
- (void)
smartTakeValue: (id)object
forKeyPath: (NSString*)keyPath;
Description forthcoming.
- (id)
storedValueForKeyPath: (NSString*)key;
Description forthcoming.
- (NSDictionary*)
storedValuesForKeyPaths: (NSArray*)keyPaths;
Description forthcoming.
- (void)
takeStoredValue: (id)value
forKeyPath: (NSString*)key;
Description forthcoming.
- (NSDictionary*)
valuesForKeyPaths: (NSArray*)keyPaths;
Description forthcoming.
- Declared in:
- EOControl/EOKeyValueCoding.h
GDL2 aims to be compatible with EOF of WebObjects 4.5
and expects to be compiled with gnustep-base or the
current version Foundation of Mac OS X together with
gnustep-baseadd, the Additions subproject of
gnustep-base. As many of the EOKeyValueCoding
methods have moved to NSKeyValueCoding, GDL2 merely
implements those methods which are not part of
NSKeyValueCoding or reimplements those
methods to insure WebObjects 4.5 compatibility or
augment the behavior for GDL2 specific features.
Method summary
+ (BOOL)
accessInstanceVariablesDirectly;
Unimplemented here. Relies on
NSKeyValueCoding.
+ (void)
flushAllKeyBindings;
Does nothing. Key bindings are currently not cached so
there is no need to flush them. This method exists
for API compatibility.
+ (BOOL)
useStoredAccessor;
Unimplemented here. Relies on
NSKeyValueCoding.
- (id)
handleQueryWithUnboundKey: (NSString*)key;
Unimplemented here. Relies on
NSKeyValueCoding.
- (void)
handleTakeValue: (id)value
forUnboundKey: (NSString*)key;
Unimplemented here. Relies on
NSKeyValueCoding.
- (id)
storedValueForKey: (NSString*)key;
Unimplemented here. Relies on
NSKeyValueCoding.
- (void)
takeStoredValue: (id)value
forKey: (NSString*)key;
Unimplemented here. Relies on
NSKeyValueCoding.
- (void)
takeValue: (id)value
forKey: (NSString*)key;
Overrides the implementation of
gnustep-base/Foundation this method
is currently deprecated in favor of setValue:forKey: yet
we aim to maintain WebObjects 4.5 compatibility.
- (void)
unableToSetNilForKey: (NSString*)key;
This method is invoked by the EOKeyValueCoding
mechanism when an attempt is made to set an null
value for a scalar attribute. Contrary to the TOC of
the documentation, this method is called
unableToSetNilForKey: and not
unableToSetNullForKey:
This
implementation raises an NSInvalidArgument
exception.
The NSKeyValueCoding
setNilValueForKey: is overriden to
invoke this method instead. We manipulate the
runtime to insure that our implementation of
unableToSetNilForKey: is used in
favor of the one in gnustep-base or Foundation.
- (id)
valueForKey: (NSString*)key;
Unimplemented here. Relies on
NSKeyValueCoding.
- Declared in:
- EOControl/EOKeyValueCoding.h
Description forthcoming.
Method summary
- (void)
takeValue: (id)value
forKeyPath: (NSString*)keyPath;
Overrides the implementation of
gnustep-base/Foundation this method
is currently deprecated in favor of setValue:forKeyPath:
yet we aim to maintain WebObjects 4.5 compatibility.
- (void)
takeValuesFromDictionary: (NSDictionary*)dictionary;
Overrides the implementation of
gnustep-base/Foundation this method
is currently deprecated in favor of setValue:forKeyPath:
yet we aim to maintain WebObjects 4.5 compatibility.
- (id)
valueForKeyPath: (NSString*)keyPath;
Unimplemented here. Relies on
NSKeyValueCoding.
- (NSDictionary*)
valuesForKeys: (NSArray*)keys;
Unimplemented here. Relies on
NSKeyValueCoding.
- Declared in:
- EOControl/EOKeyValueCoding.h
Description forthcoming.
Method summary
- (void)
takeStoredValuesFromDictionary: (NSDictionary*)dictionary;
Description forthcoming.
NSString* EOTargetObjectUserInfoKey;
Description forthcoming.
NSString* EOUnknownUserInfoKey;
Description forthcoming.
Up