Wednesday, February 7, 2018

Setting Patterns

It is time to give Nmxj some settings. I really like the VIM and Qutebrowser settings pattern for listing and setting configuration options (I'm not doing the 'rc' file model at theis point), so I will be going with something similar. I thought about doing a config file that could be edited manually or through the UI but I've decided to go with a DB driven structure so settings will be made solely through the UI.

Honestly there won't be a ton of settings - at least not right away. So far just the default database file to open when Nmxj is launched (This is automatically updated when the user opens a different DB file), indentation amount for indented fields, and screen clearing. The screen clearing tells the app to either display output in a running stream or to.clear the screen with each output.
Settings values / names can be viewed with a get:[filter] command, and set with a set:<setting>, <value> command. If in time this becomes unruly I will probably convert it to a config file and.UI structure. At that point I'll have to dig a little into storing settings into a file in Java. Up until this point I've only dealt with manually edited config files that are just read by the application.
What are your favorite settings patterns?

No comments:

Post a Comment

From Shotcut to Kdenlive

So I've been using Shotcut for a while now, for my YouTube videos... and music videos. I love the application. Slicing clips, doing fade...