App-SeismicUnixGui
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui view on Meta::CPAN
$color_listbox->my_dialogs( 'color_listbox', 0 )
Two possible outcomes ($ans4ok and $ans4cancel)
The first parameter called is the title of the dialog box and the
second parameter (this case = 0) selects which message to display.
The first parameter also serves to find the corresponding message which
can be found within the messages folder
Q.. How do I know that a listbox is about to be overwritten?
color_listbox
my $vacancy = $color_listbox->is_vacant_listbox($future_color);
Q. What is gui_history used for?
gui_history is a hash and module of the same name that stores common variables that are needed by multiple
programs at once.
e.g., within conditions4flows we have:
conditions4flows->{_occupied_listbox_aref}
The hash variable:
"_occupied_listbox_aref ", accessible in
L_SU via the shared "gui_history" hash
Q. Where do we set vacancy and occupancy of 'color' listboxes?
In color_flow:
delete_from_flow_button
In L_SU:
user_built_flows and FileDialog_button
conditions4flows, set_defaults4delete_whole_flow_button
gui_history
conditions4big_streams
conditions_gui (deprecated? Should be! 7.15.21)
Q. Which module keeps track of which colored listbox is occupied?
L_SU, color_listbox
Q. Where do we check to see whether a flow box is occupied before we can reserve a space?
Q. What are the extension abbreviations for different types of files, according to their format
text is usually txt
SEG-Y files is usually sgy
Seismic Unix files is always su
binary files bin
Extra: "no extension" means go to the PL_SEISMIC directory to search for or deposit files
Q. How does L_SU know on which line to put a selected file name in the parameter list?
(1) _spec files bind the index of the appropriate line in the list to a directory which will be openened.
TODO: A click in the first line always will take the user to a data directory
TODO: make ALL links via bindings
defined in *_spec files.
(2)
Q. How do I add another default directory to be created when a new project is saved and run?
For examples a new directory call 'png' for image files of that type?
Follow the examples:
in: ~/configs/big_streams/Project_config.pm where all used and unused definitions are kept
and in in ~big_streams/SetProject.pl where we can see how some are implemented but others are
not (Commented lines)
Q. How do I add in a new sunix-based program into L_SU, e.g., a
Seismic Unix program such as sufctanismod
EXAMPLE 1
1. Run ~ developer/sunix/sudoc2pm.pl
As a result, three files will be generated:
A. sufctanismod_spec.pm,
B. sufctanismod.config and
C. sufctanismod.pm,
These three files are found in the same directory as their model
program
e.g.~ developer/Stripped/model
2. Modify each file as follows:
A. sufctanismod.config
Make sure that only variables and their values that belong to the program appear in
this file. You will have to carefully review the self-documents that correspond
to this program, i.e. ~ developer/Stripped/model/sufctanismod.su.main.synthetics_waveforms_testpatterns
B. sufctanismod.pm
Make sure that you have one method/subroutine for each of the variables listed on one line each
in 'sufctanismod.config'. Because there are 61 such variables in this example, make the $max_index =
(number of variables -1 ) = 60
Near ~ L1824 ...
my $max_index = 60;
C. sufctanismod_spec.pm
Although tis program is used in standalone fashion normally, for convenience,
I kept all the default settings that explain the behavior of this program for stdin and stdout.
3. Move each of the 3 files into their respective directories:
A. Move sufctanismod.config to ~configs/model
B. Move sufctanismod.pm to ~sunix/model
C. Move sufctanismod_spec.pm to ~specs/model
4. Modify the following perl modules:
A. ~misc/L_SU_global_constants.pm
~ L. 442
In alphabetical order, include the program name within the following list :
my @sunix_model_programs = ( "suplane", "susynlv", "unif2", "suea2df", "sufctanismod","sufdmod1", "sufdmod2" );
EXAMPLE 2
1. Run ~ developer/sunix/sudoc2pm.pl
As a result, three files will be generated:
A. vel2stiff_spec.pm,
( run in 0.693 second using v1.01-cache-2.11-cpan-df04353d9ac )