This is true, although a get will also check for the special keywords values, keySet, size, and entrySet, returning those method calls on the Map (similar to how valueForKey behaves on an NSDictionary). If you want to alter this behavior I would recommend implementing the KeyValueCoding interface on your object.

-Ryan

On Dec 11, 2007, at 7:58 AM, Alexander Spohr wrote:

FYI:

The behavior of NSKeyValueCoding.DefaultImplementation has changed.

If you used subclasses of Maps and wanted to add instance variables to be used by NSKeyValueCoding the following was a valid method inside your MapSubclass:

        public Object valueForKey(String key) {
                Object retVal = null;
                try {
retVal = NSKeyValueCoding.DefaultImplementation.valueForKey(this, key);
                } catch (Exception e) {
                        retVal = this.get(key);
                }
                return retVal;
        }

This behavior does not work anymore!

If NSKeyValueCoding.DefaultImplementation gets a Map it forwards the request to MapImplementation which ONLY asks for map.get(key) and returns null if there is no such key. You can not get to any instance-variable using NSKeyValueCoding anymore as all Maps are redirected to the new (non-documented) MapImplementation.valueForKey().

        atze

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rklems%40apple.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to