DOCUMENTATION
SYNOPSIS
PERL PERL PROGRAM NAME: project_selector
AUTHOR: Juan Lorenzo
DATE: May 3, 2018
VERSION: 1.0.1
DESCRIPTION Package containing methods
and objects for managing the
project on which user works
BASED ON:
USE
NOTES
Examples
CHANGES and their DATES
Instantiate new modules
private hash
define
lcoal variables
sub _continue
sub _cancel
sub cancel
sub _create_new
derives from L_SU.pl
The following widget references MUST exist already
These references are set in the main that calls this package:
$project_selector ->set_check_buttons_w_aref($L_SU_project_selector->{_check_buttons_w_aref});
$project_selector ->set_labels_w_aref($L_SU_project_selector->{_labels_w_aref});
$project_selector ->set_values_w_aref($L_SU_project_selector->{_values_w_aref});
The current subroutine must set the length, and the first index
so it is best to keep it at the end of the package after "set_length and set_fist_index"
sub _get_labels_from_gui
Extract labels from the user screen The user may have modified the labels TODO not working
_get_message_box_w
sub _get_project_names_aref Find simple Project names rom configuration path for user
sub _get_values_from_gui
Extract labels from the user screen The user may have modified the labels
sub _ok
Save a configuration file and a project
Create all the directories
For the case that a project that already exists chosen:
raise alarm if more than one project is checked
overwrite the current project configuration file
with the one belonging to the newly selected
active project
For the case that a new project is created: create a new folder: /home/username/configuration/New Project/ and make a copy of the Project.config inside: /home/username/configuration/New Project/Project.config Also copy the Project.config to the active directory as: /home/username/configuration/active/Project.config
TODO: Run the new configuration file so that the directories
are created
sub _set_gui
show project
names, and their paths
taken from user configuration file
$param_widgets_pkg must previously exist
Using default labels and values from
a previous ("default")Project configuration
If there is an active project the "default"
is the active one.
sub _set_length
From HOME directory and configuration path for user estimate the number of projects available
sub _set_length
From HOME directory and configuration path for user estimate the number of projects available
sub _set_PROJECT_HOMES_aref
Find out HOME directory from configuration
directories of user
sub create_new
new current settings
sub ok
continue
sub set_check_buttons_w_aref
sub set_create_new_button_w
sub set_gui
Always carried out when main LSU_project_selector begins
sub set_hash_ref
Transfer hash of variables from the main program #$L_SU_project_selector->{_labels_w_aref} = $param_widgets -> get_labels_w_aref(); #$L_SU_project_selector->{_check_buttons_w_aref} = $param_widgets -> get_check_buttons_w_aref(); #print($hash-ref->{_});
sub set_labels_frame
a widget reference
set_labels_w_aref
sub set_length
Find out HOME directory and configuration path for user
set_message_box_w
sub set_mw
main window widget
sub set_param_widgets_pkg
get project names from user configuration directory
sub set_current_program_name
set project names from user configuration directory
sub _set_project_names_aref
gset project names from user configuration directory