• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Proper place for functions in KVC paths?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper place for functions in KVC paths?


  • Subject: Re: Proper place for functions in KVC paths?
  • From: Lachlan Deck <email@hidden>
  • Date: Wed, 30 Aug 2006 16:17:41 +1000

Hi John,

On 30/08/2006, at 7:20 AM, John Larson wrote:

Hello,

I think the api implies they all work and will have differing outcomes depending on what you would like to 'sum' or 'count' etc. e.g., Consider the keypath: 'company.people.accounts.totalLiability'.

You can think of the keypath as a tokenized string that is evaluated recursively through the elements toward the end of the string and the @operators are looking for scalar values to iterate over and accumulate. So, for company.people.account.totalLiability where people is the only array, then email@hiddenLiability would produce the sum as desired. Suppose, however, that each person had multiple accounts. The following would also be valid: email@hiddenemail@hiddenLiability.


The point of this was to not leave the thread with the idea that there can only be one @operator in a keypath.

This is the kind of thing that WOBuilder provided without thought ;-) I was sure it was possible but had a mental blank. Thanks.


with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Proper place for functions in KVC paths? (From: "John Huss" <email@hidden>)
 >Re: Proper place for functions in KVC paths? (From: Chuck Hill <email@hidden>)
 >Re: Proper place for functions in KVC paths? (From: Lachlan Deck <email@hidden>)
 >Re: Proper place for functions in KVC paths? (From: Chuck Hill <email@hidden>)
 >Re: Proper place for functions in KVC paths? (From: Lachlan Deck <email@hidden>)
 >Re: Proper place for functions in KVC paths? (From: John Larson <email@hidden>)

  • Prev by Date: Restore and Save Session
  • Next by Date: Re: Proper place for functions in KVC paths?
  • Previous by thread: Re: Proper place for functions in KVC paths?
  • Next by thread: Reusable translated button
  • Index(es):
    • Date
    • Thread