In some earlier wisdom, I implemented property Set/Get methods in two forms. One with a wxPGProperty parameter, the other taking a String parameter - also suffixed with "ByName".
Example
GetPropertyValueAsDouble:Double(prop:wxPGProperty)
GetPropertyValueAsDoubleByName:Double(name:String)
It seemed a good idea at the time :-p
However, I am considering changinge these to use a SINGLE call, where the parameter changes to Object, and you can pass in either :
GetPropertyValueAsDouble:Double(prop:Object)
I think this is a much tidier API.
Of course, it would mean dropping the ByName methods, which is likely to break your code - but all you would have to do is remove these 6 characters from the method calls and rebuild.
I generally try not to change APIs, as it is a pain for everyone. But I think in this case it is a big improvement.
Does anyone disagree? :-)
Example
GetPropertyValueAsDouble:Double(prop:wxPGProperty)
GetPropertyValueAsDoubleByName:Double(name:String)
It seemed a good idea at the time :-p
However, I am considering changinge these to use a SINGLE call, where the parameter changes to Object, and you can pass in either :
GetPropertyValueAsDouble:Double(prop:Object)
I think this is a much tidier API.
Of course, it would mean dropping the ByName methods, which is likely to break your code - but all you would have to do is remove these 6 characters from the method calls and rebuild.
I generally try not to change APIs, as it is a pain for everyone. But I think in this case it is a big improvement.
Does anyone disagree? :-)