icasdri / Mather

A powerful expression-based calculator, unit converter, and general computation engine for Android
GNU General Public License v3.0
58 stars 7 forks source link

Persistent history #7

Open paride opened 8 years ago

paride commented 8 years ago

I think Mather should keep its history when it's closed and opened again.

stpr-dev commented 8 years ago

I agree, it is a very nice idea. For recent commands: I think you can do what MATLAB/GNU Octave does: you can save the command history in a file. I am not sure how the variables and other things are handled though, but it would indeed be nice if those can be saved too (Say I saved some values to variables A,B,C... it would be nice if they could be saved too). Maybe have an option in the settings menu to enable/disable these behaviours.

Alternatively, and this for me is more appealing, if storing history and variables is relatively easy, you could provide the user with an option to save the 'workspace' into a file (or something) from which they can 'load' it back. This way, they can define arbitrary functions and variables, save them and not worry about having to define them and type them again and again.

icasdri commented 8 years ago

I originally was going to implement this with Android's built-in preference store. But, I do like the idea of giving the user a choice of storing into an external file.

stpr-dev commented 8 years ago

@icasdri On second thoughts, I would suggest both. The built-in option will be useful when the user does not want to constantly export the data everytime they open the app. An 'export' option (probably in the settings menu) will just provide more flexibility by allowing users to define arbitrary functions and variables only once which can then be saved to a file somewhere, as specified by the user. This can then be loaded whenever required (something like a 'load' function in the menu).