[Modeling-users] Name for methods valueForKey and takeValueForKey?
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2003-02-17 12:16:30
|
Hi, i find these names unclear, and even disturbing \-; Should it ever be possible to change them, and if these names should avoid using 'get' and 'set' not to clash with dedicated getters and setters, then, instead of: valueForKey valueForKeyPath takeValueForKey takeValueForKeyPath I can suggest names such as: retrieveKeyValue retrieveKeyPathValue assignKeyValue assignKeyPathValue or valueFromKey valueFromKeyPath valueForKey valueForKeyPath or, more consistently, if we reserve the attribute names valueByKey and valueByKeyPath: getValueByKey getValueByKeyPath setValueByKey setValueByKeyPath or, even simpler and more elegant (but need extra check per call) is to just have the following two methods (reserving attribute name keyValue), and determine dynamically whether key specified is a simple key or a path (check for '.' should be enough?) getKeyValue setKeyValue Cheers, mario |