bug-gnustep
[Top][All Lists]
Advanced

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

[bug #22565] EOKeyValueCoding: Support modern Cocoa KVC semantics for NS


From: Tim McIntosh
Subject: [bug #22565] EOKeyValueCoding: Support modern Cocoa KVC semantics for NSArray aggregate functions
Date: Wed, 12 Mar 2008 06:22:37 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/523.15.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.15

URL:
  <http://savannah.gnu.org/bugs/?22565>

                 Summary: EOKeyValueCoding: Support modern Cocoa KVC
semantics for NSArray aggregate functions
                 Project: GNUstep
            Submitted by: tmcintos
            Submitted on: Wednesday 03/12/2008 at 06:22
                Category: gdl2
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The Cocoa KVC semantics for NSArray aggregate functions (e.g. @sum) differ
from the traditional semantics implemented in the EOControl framework when
there is a key path following the aggregating operator instead of a simple
key.

For example:   displayGroup.allObjects.@sum.itemsArray.@count

With Cocoa's -[NSArray valueForKeyPath:] behavior, this would invoke [object
valueForKeyPath: @"itemsArray.@count"] on each object in the display group,
then return the sum of the counts.

In order to ease porting of WebObjects 5 applications to GSWeb/GDL2, it is
desirable to support this behavior, if possible.

Though not suitable as a final implementation, the attached patch file
illustrates the desired behavior.  Note that this patch also removes the
handling of "special keys" in NSDictionary (e.g. @"allKeys" vs. Cocoa's
@"@allKeys" (also supported in -base)).

Reference: 
http://lists.gnu.org/archive/html/gnustep-dev/2008-03/msg00093.html



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wednesday 03/12/2008 at 06:22  Name: EOKeyValueCoding.m.diff  Size: 3kB
  By: tmcintos

<http://savannah.gnu.org/bugs/download.php?file_id=15245>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22565>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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