API Request : ability to add Custom KVC Collection Operators

Originator:nicolas.bouilleaud
Number:rdar://13188137 Date Originated:2013-02-10
Status:Duplicate/7163422/Open Resolved:2013-02-16
Product:Developer Tools Product Version:4.6
Classification:Feature (New) Reproducible:Not applicable
 
There are currently exactly 10 KVC Collection operators : 
* @count,
* @sum,
* @avg,
* @min,
* @max,
* @unionOfObjects,
* @distinctUnionOfObjects,
* @distinctUnionOfArrays,
* @distinctUnionOfSets,

The docs about KVC Collection Operators clearly states that there is currently no API to add custom operators.  It's in fact very possible, by adding methods named "_<operator>ForKeyPath:" to NSArray (or NSSet).

There are many scenarii where this feature would benefit greatly. I wish Apple would provide a real API for this.

(Note : I wrote about it recently,  on http://bou.io/KVCCustomOperators.html)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!