DOCUMENTATION
SYNOPSIS
PERL PROGRAM NAME: binding.pm
AUTHOR: Juan Lorenzo
DATE: May 21 2018
DESCRIPTION:
Create bindings between values and buttons an actions Make a binding based on the paramters inside the spec file for that progam (prog_name = $package) e.g. a package can be data_in_spec.pm $length is the number of bound Entry/Values widgets Each value or Entry widget is bound by MB3 to a FileDialog_button such as 'Data' = opening a data file The suffix type of file to open or save (e.g. *su or text or bin etc. ) also exists in the _spec file and can be used later (TODO)
calls FileButton within this package
otherwise well-encapsulated
USED FOR:
BASED ON:
NEEDS:
for binding, we need to know
the program name
the program.spec requirements
connect bindings of a specific file to the
parameter wiudget value/Entry
Not all programs have these bindings
the bindig type may be for opening a data file
or for saving a file
or for plotting a file
the binding has a data type:
package binding_superflows
package bindings_flows
set_program_name
set the widget handles locally
set values
set_labels
a_ref = get_binding_types <ButtonRelease-3>
a_ref = get_suffix_types su / text
a_ref = get_command names open/save/view/plot etc.
a_ref = get_command_settings 1,2,3,4 etc. or empty
Modules in use
Instantiation
Declare local variables
private hash
sub set_prog_name_sref
Know which _spec file to read for behaviors
sub setFileDialog_button_sub_ref
Set reference to a subroutine in upper levels i.e., L_SU, _FileDialog_button, that connects to the Filebutton for opening directories
sub set_values_w_aref
sub set
Bring in a different module for each binding each module has its own rules through *_spec.pm as a program gets used.
superflow bindings for dial_type e.g., = Data use _FileDialog_button, a method within L_SU
User-built programs (e.g., sunix programs) which use dial_type = Data use _FileDialog_button, a method within each grey_flow, pink_flow etc.