Re: Patch: Bug 50278



Owen Taylor wrote:

> What if they pass in a step of 0? I suppose log10 might return +INF so
> it works, but I wouldn't trust it. 

I should probably set a precondition for step != 0.  A spin button with
a step of zero is pretty braindead.  

> Also, why the digits > 5? If they
> pass in a tiny step, should they get a lot of digits?
> 
The digits > 5 check is analogous to the precondition on the _new()
function. Since the field is 3 bits, 7 would seem a more intuitive
threshhold. Lacking the motivation for further discovery, I just blindly
added the same guard.
 
> Otherwise, looks good.

Okay, I'll make those tweaks and add the docs. Unless you prefer to see
it again, I'll just attach a final patch to the bug report, and commit
the changes tomorrow.

Mike




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]