mintcalc icon indicating copy to clipboard operation
mintcalc copied to clipboard

Calculation Preview

Open fillwithjoy1 opened this issue 1 year ago • 4 comments

Can you implement this feature? Essentially when you make a calculation, a preview of the answer appears. A good example of this is in Google calculator. Here's a screenshot for your reference Screenshot_20230801-064748

Notice how the answer is briefly displayed in the bottom, as a preview.

fillwithjoy1 avatar Jul 31 '23 20:07 fillwithjoy1

That's what I'm also trying to achieve. I'm currently using math_expressions and here the whole expression needs to be written before evaluation happens. I trying to find a better way to implement this or perhaps I'll work from scratch when all roads are blocked

boredcodebyk avatar Aug 01 '23 00:08 boredcodebyk

i'll be writing from scratch

boredcodebyk avatar Aug 03 '23 16:08 boredcodebyk

I hope by from scratch you don't mean to rewrite the expression parser and calculator? That would be pretty bugs prone, IMHO. Why not just feed the library the whole expression on every button press, and just not show any preview if it returns error (i.e. when expression is malformed)? Or show "Malformed expression" text.

mks-h avatar Nov 01 '23 13:11 mks-h

by from scratch, I mean the layout, as for now. but if for some reason I have to write the all math functions, I'll do that too. i just need some more time, as I'm busy with irl stuffs a lot

boredcodebyk avatar Nov 01 '23 13:11 boredcodebyk