[Kmymoney-devel] Set and Get, or what?

allan aganderson at ukonline.co.uk
Sun Oct 24 23:56:49 CEST 2010


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.

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.

Allan




More information about the KMyMoney-devel mailing list