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.
As is, to submit data without using
DataEntryInterfaceusers 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
.processcall into ".read_widget" and ".process_data" functions. The.processcall 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.This would still require some internal knowledge of what format
.process_dataexpects. Including a type with each processor of what to expect would allow some IDE support for this behavior.