boredcodebyk/mintcalc

Calculation Preview

fillwithjoy1 opened this issue · 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.

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

i'll be writing from scratch

mks-h commented

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.

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