Need a little help with KVC Array operators
Need a little help with KVC Array operators
- Subject: Need a little help with KVC Array operators
- From: Lee Morgan <email@hidden>
- Date: Sun, 24 Apr 2005 18:33:52 -0400
Hey list,
I need a little help with KVC Array ops. I'm trying to display a total price in a text field in IB using bindings.
I have an NSMutableArray of titles which contains an NSMutableArray of issues which has a NSDictionary that contains a NSNumber called originalPrice.
So it's setup like this
titles.issues.properties.originalPrice
What I'm trying to do is display the sum of every issue of every title in a text field.
I just can't seem to get a combination of @unionOfArrays and @sum ops to get a total for the text field.
This is what I've got working in xCode so far...
NSArray *prices = [titles valueForKeyPath:@"@unionOfArrays.issues.properties"];
NSLog(@"%@", [prices valueForKeyPath:@"@sum.originalPrice"]);
This logs the total that I'm looking for, but I just can't seem to find a way to combine those two valueForKeyPaths into one.
- lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden