[Kmymoney-devel] Re: Set and Get, or what?
allan
aganderson at ukonline.co.uk
Wed Oct 27 23:06:31 CEST 2010
On 27/10/10 20:22, Cristian Oneţ wrote:
> On Mon, Oct 25, 2010 at 12:56 AM, allan <aganderson at ukonline.co.uk> wrote:
>
>> Now I'm back in 'production' mode, I've found a bug had crept in to the
>> patches I put up yesterday for the csv plugin. Â It didn't show up during
>> the testing I did following the implementation of the set and get
>> routines, because I made the mistake of not making a mistake. Â What I
>> mean is that all worked well If the correct column numbers were used,
>> but if a mistake was made and I had to clear the settings, then the
>> problem showed up.
>>
>> I obviously wasn't thinking very clearly when I did one of the changes,
>> didn't like the way I had done this particular one, changed it a bit
>> dubiously, but as it seemed to work, I left it. Â I've now corrected that
>> error.
>>
> Just a suggestion try to drop the really long intro's in the future
> :). It only help confusing the reader. If someone wants more info
> he'll ask. Take this as a friendly advice :).
>
>
>> Which brings me finally to my query. Â It revolves around a set method,
>> which I only ever need to clear the setting, never to enter a new
>> value. Â In the body, I do the clear() of the field, which I would really
>> need to explain in the header. Â Or, is it OK for this particular set
>> method to be named clearXxxx(), instead of setXxxx()? Â My leaning is
>> towards the latter, but don't want to upset any purists<BG> Â In general,
>> can I please myself about naming, while accepting style requirements and
>> transparency? Â I think this is about such transparency really.
>>
> If the method only clears something and does not set something than
> it's name should be clearXxxx(). You don't need to worry about
> upsetting anyone since where all in this for the fun not to get upset
> :).
>
> Regards,
> Cristian
>
In fact, I had already reached that same conclusion and renamed it.
Thanks
Allan
More information about the KMyMoney-devel
mailing list