Skip to content

Decoupling data validation from tkinter widgets #4

@hstaige

Description

@hstaige

As is, to submit data without using DataEntryInterface users have to do the data validation and naming of columns themselves or load their data in dummy tkinter widgets. This runs counter to the idea of templates, which set standards for widget creation, processing of widget information, naming of fields, and validation.

One solution is to separate the .process call into ".read_widget" and ".process_data" functions. The .process call would then just consist of calls to the two subfunctions. This would allow for programs to call the .process_data pieces of the processors to validate the data and provide the correct column names without having to make tkinter widgets.

eproc = energy_template.fields[3].processor 
values = values | epoc.process_data('100(3)')

This would still require some internal knowledge of what format .process_data expects. Including a type with each processor of what to expect would allow some IDE support for this behavior.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions