Skip to content

Rewrite save/load code to be data-driven #15

@cathoderaydude

Description

@cathoderaydude

Current approach to taking GUI input and saving/loading values is a mess. Everything should work like this:

ValidateForm() - Walks the entire UI, flags anything that's iffy (and returns false if so), otherwise copies values to backing variables

UpdateForm() - Copies all backing variables to UI fields

Save() - Runs ValidateForm(), pops a dialog if false to confirm if user wants to save last known good values despite invalid values in fields, then copies from backing variables to INI

Load() - Imports INI values to backing variables, then runs UpdateForm() and then ValidateForm() (just in case form rules have changed since last run)

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions