These notes were written for developers creating applications with the TRIMtools GUI. They focus on the features used in the Chemical Information System and include descriptions of each feature with implementation TRIMpl code.
{
char ret[42];
/* The BALANCE ACTION was designed after the example given on page 70 of
the "Mettler/Toledo Reference Manual Standard Interface Command Set" */
if (list_curr(p.wl,@p.unit) != "M") /* Unit must be mg to weigh on balance */
error("Unit must be 'M' to fetch a balance weight");
active_field(4); /* put cursor on balance field */
if (balance("@")!="I4 A ") /* reset balance */
break;
if (balance("""K 3""")!="K A") /* disable key function on bal & return key id */
break;
if (balance("""D 'BOTTLE'""")!="D A") /* display 'BOTTLE' on balance LCD*/
break;
if (balance("""""") != "K C 3") /*send balance a NULL & wait for user to tare*/
break;
if (balance("T")!="T S ") /* send tare cmnd to balance */
break;
if (balance("""D '" /* display mg to weigh on bal LCD */
^^list_curr(p.wl,@p.QTY)/1000^^"'""")!= "D A")
break;
if (balance("""""") != "K C 3") /*send balance a NULL & wait for user to tare*/
break;
if (balance("S")!="S S ") /* get compound weight fm balance */
break;
}
BALANCE() writes a list with three fields:
The balance list is written to TRIMHome\cache\infile.ini. This file is used by the balance driver, TRIMHome\bin\scale.exe, to send data to and from the balance. When the driver receives data from the balance it is it is filed in TRIMHome\cache\outfile.ini. BALANCE() reads outfile.ini to get the data returned from the balance and report it to the user.
Data returned from the balance is displayed on the status line. It is also checked for its validity using a list containing error codes and error descriptions. If the balance returns an error the current weighing script is aborted. If the balance returns a valid weight it is stored in the window list.
{
char response[5];
list response_list;
list return_list;
list_mod(g.balance_list,1,"port",g.port); /* port defined in wrcis.ini */
list_mod(g.balance_list,1,"outfile",g.outfile); /*outfile defined in wrcis.ini*/
list_mod(g.balance_list,1,"command",parm.0); /* command from weigh action */
list_file(g.balance_list,"gui!"^^g.cache_dir^^"infile.ini","a");
winexec("scale "^^g.cache_dir^^"infile.ini",1);
return_list= list_open("gui!"^^g.outfile,10);
response = substr(list_curr(return_list,0),1,5);
if (!response_list){
response_list= list_open("5 80",6,"Balance Responses: Code & Description");
list_mod(response_list,1,"D A","Response to the prompted text");
list_mod(response_list,1,"ES", "Syntax error");
list_mod(response_list,1,"ET", "Transmission error. The balance has "
"received a 'faulty' command, e.g. "
"a parity error or interface break.");
list_mod(response_list,1,"EL", "Logical error. Balance "
"can not execute the received command.");
list_mod(response_list,1,"I4 A ","Balance is reset and ready for operation.");
list_mod(response_list,1,"K A","Key control command understood and "
"successfully executed.");
list_mod(response_list,1,"K I","Key control command understood, but "
"not executable at present. Balance may "
"be in menu or input mode.");
list_mod(response_list,1,"K L","Key control command understood, but "
"command parameter wrong.");
list_mod(response_list,1,"K C 3","Tare key was pressed briefly, or tare key "
"was released after more than 2 seconds.");
list_mod(response_list,1,"K R","Tare key was held about 2 seconds. "
"This response repeats every 2 seconds "
"as long as the tare remains pressed.");
list_mod(response_list,1,"S I","Command not executable. "
"Balance is executing another command "
"(e.g. taring) or stability not reached.");
list_mod(response_list,1,"S +","Balance in overload range.");
list_mod(response_list,1,"S -","Balance in underload range.");
list_mod(response_list,1,"T I","Taring not performed. Balance is currently "
"executing another command (e.g. zero "
"setting) or unable to stabilize.");
list_mod(response_list,1,"T +","Upper limit of taring range exceeded.");
list_mod(response_list,1,"T -","Lower limit of taring range exceeded.");
}
if(response == "S S "){
bell();
status("Balance returned a stable weight of "
^^translate(substr(list_curr(return_list,0),5)," ","")^^".");
field= 1000*(to_number(substr(list_curr(return_list,0),5,10)));
g.modified=true;
}
else if(response == "T S "){
bell();
status("Balance is tared and has a value of "
^^translate(substr(list_curr(return_list,0),5)," ","")^^
" in tare memory.");
}
else if (list_find(response_list,0,response)){
bell(); bell();
status("Balance returned '"^^list_curr(response_list,0)^^"': "
^^list_curr(response_list,1) );
field= NULL;
g.modified=true;
}
else{
bell(); bell();
status("Balance returned "^^list_curr(return_list,0));
field = NULL;
g.modified = true;
}
return_list = NULL;
g.balance_list = NULL;
delete("gui!"^^g.outfile);
return(response);
}
{
list barcode;
if (!to_int(g.bar_code)) /* g.bar_code is environ var set in wrcis.ini */
error("Bar Code program is not installed on this computer.");
else if (!p.bn_d) /* BN must be displayed to print a bar code */
error("Enter BN field before printing bar code");
else{
barcode= list_open("80",9,"Ship BarCode list");
list_mod(barcode,1,"[LABEL]");
list_mod(barcode,1,"Label=C:\WINBAR3X\LABELS\BN1MAKE.LAB");
list_mod(barcode,1,"Port=COM3:");
list_mod(barcode,1,"Quantity=1");
list_mod(barcode,1,"P-BN="^^p.bn_d);
list_mod(barcode,1,"P-NAME=WindowBar AutoPrint");
list_file(barcode,"gui!c:\winbar4X\batch\new_bn.bat","a");
status("Created file c:\winbar4X\batch\new_bn.bat");
}
}
{
list barcode;
if (!to_int(g.bar_code)) /* g.bar_code is environ var set in wrcis.ini */
error("Bar Code program is not installed on this computer.");
else if (!p.bn_d) /* BN must be displayed to print a bar code */
error("Enter BN field before printing bar code");
else{
barcode= list_open("80",9,"Ship BarCode list");
list_mod(barcode,1,"[LABEL]");
list_mod(barcode,1,"Label=C:\WINBAR3X\LABELS\WRBSHIP2.LAB");
list_mod(barcode,1,"Port=COM3:");
list_mod(barcode,1,"Quantity=1");
list_mod(barcode,1,"P-BN="^^p.bn_d);
list_mod(barcode,1,"P-TS="^^p.test_d);
list_mod(barcode,1,"P-MG="^^p.ship_qty_d^^" M");
list_mod(barcode,1,"P-NAME=WindowBar AutoPrint");
list_file(barcode,"c:\winbar4X\batch\ship_bn.bat","a");
status("Created file c:\winbar4X\batch\new_bn.bat");
}
}
[PARAMETER] PGM_UNITS=INCHES CLASS=ZEBRA PRINTER=Zebra 105 ORG=0,0 DB_CLASS=Vista DB_PATH= DENSITY=8 dots/mm DOTS_MMX=8.00000 DOTS_MMY=8.00000 DOTS_INCHX=203.20000 DOTS_INCHY=203.20000 DESC=PRINTS ONE BOTTLE LABEL LABELSIZE=305,114 SIZE=305,114 EXTENT=305,114 LABEL_OFFSET=0,6 CUTTER_ENABLE=N CUTTER_QTY=0 DARKNESS=60 CUTTER_PAUSE_OVERRIDE=N PRINTSPEED= 51 mm/sec MODE=Tear Off LABEL_ROTATION=0 degrees CLEAR_PRINTER=N MIRROR=N REVERSE=N BACKFEED=N DIRECT_THERMAL=N CONTINUOUS=N SEQREPEAT_QTY=2 SLEW_DOTS=0 STOCK=C:\WINBAR3X\STOCKS\BTLB2UP.STK MAX_BITMAPS=6 DB_EXT= [BARCODE] ORG=35,11 SYMBOLOGY=CODE 39 RATIO=2:1 HEIGHT=69 OBJ_ROTATION=0 degrees XDEM=2 GUIDE=Y INTERP_SIZE=12,17 INTERP_OFFSET=5 INTERP_STARTSTOP=Y BC_X_OFFBEF=0 BC_X_OFFAFT=0 INTERPRETATION=BELOW PACK= CHECKSUM=0 START_CHAR= STOP_CHAR= SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=P-BN DATA=BN12345 EXTENT=232,89 [END_OBJS] [PROMPT] STATEMENT=Enter Bottle Number to Print NAME=P-BN MAX_LENGTH=7 DATA_TYPE=STRING [END_VARS]
[PARAMETER] PGM_UNITS=INCHES CLASS=ZEBRA PRINTER=Zebra 105 ORG=0,0 DB_CLASS=Vista DB_PATH=c:\winbar3x\data DENSITY=8 dots/mm DOTS_MMX=8.00000 DOTS_MMY=8.00000 DOTS_INCHX=203.20000 DOTS_INCHY=203.20000 DESC= LABELSIZE=256,272 SIZE=256,272 EXTENT=256,272 LABEL_OFFSET=0,16 CUTTER_ENABLE=N CUTTER_QTY=0 CUTTER_PAUSE_OVERRIDE=N PRINTSPEED= 76 mm/sec LABEL_ROTATION=0 degrees CLEAR_PRINTER=N MIRROR=N REVERSE=N BACKFEED=N CONTINUOUS=N SEQREPEAT_QTY=0 SLEW_DOTS=0 STOCK= MAX_BITMAPS=6 DARKNESS=30 MODE=Tear Off DIRECT_THERMAL=N [BARCODE] ORG=5,35 SYMBOLOGY=CODE 39 RATIO=2:1 HEIGHT=51 OBJ_ROTATION=90 degrees XDEM=2 GUIDE=Y INTERP_SIZE=12,17 INTERP_OFFSET=5 INTERP_STARTSTOP=Y BC_X_OFFBEF=0 BC_X_OFFAFT=0 INTERPRETATION=ABOVE PACK= CHECKSUM=0 START_CHAR= STOP_CHAR= SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=P-BN DATA=BM12345 EXTENT=232,71 [BARCODE] ORG=181,46 SYMBOLOGY=CODE 39 RATIO=2:1 HEIGHT=51 OBJ_ROTATION=270 degrees XDEM=2 GUIDE=Y INTERP_SIZE=12,17 INTERP_OFFSET=5 INTERP_STARTSTOP=Y BC_X_OFFBEF=0 BC_X_OFFAFT=0 INTERPRETATION=ABOVE PACK= CHECKSUM=0 START_CHAR= STOP_CHAR= SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=P-MG DATA=1234M EXTENT=180,71 GROUPED= [TEXT] ORG=39,4 FONT=Smooth Font FONT_SIZE=21,26 FONT_MULT=1,1 OBJ_ROTATION=0 degrees OBJ_CHARSET=USA - 1 REVERSE=N SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=CONST Field DATA=WRAIR EXTENT=57,26 [TEXT] ORG=67,242 FONT=Smooth Font FONT_SIZE=19,26 FONT_MULT=1,1 OBJ_ROTATION=0 degrees OBJ_CHARSET=USA - 1 REVERSE=N SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=CONST Field DATA=Test System: EXTENT=95,26 GROUPED= [TEXT] ORG=176,243 FONT=Smooth Font FONT_SIZE=19,26 FONT_MULT=1,1 OBJ_ROTATION=0 degrees OBJ_CHARSET=USA - 1 REVERSE=N SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=P-TS DATA=TS EXTENT=19,26 GROUPED= [TEXT] ORG=158,3 FONT=Smooth Font FONT_SIZE=14,26 FONT_MULT=1,1 OBJ_ROTATION=0 degrees OBJ_CHARSET=USA - 1 REVERSE=N SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=F-MONTH DATA=October 10. 1994 EXTENT=89,26 GROUPED= [TEXT] ORG=100,27 FONT=Smooth Font FONT_SIZE=17,22 FONT_MULT=1,1 OBJ_ROTATION=270 degrees OBJ_CHARSET=USA - 1 REVERSE=N SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=CONST Field DATA=JOHN_NOTSCH@WRSMTP- EXTENT=178,22 GROUPED= [TEXT] ORG=136,67 FONT=Smooth Font FONT_SIZE=17,22 FONT_MULT=1,1 OBJ_ROTATION=270 degrees OBJ_CHARSET=USA - 1 REVERSE=N SERIALIZED=N LEADING_ZEROS=N INC/DEC=INC STEP=1 VARIABLE_NAME=CONST Field DATA=CCMAIL.ARMY.MIL EXTENT=123,22 GROUPED= [END_OBJS] [PROMPT] STATEMENT=Enter Bottle Number: NAME=P-BN MAX_LENGTH=7 DATA_TYPE=STRING [PROMPT] STATEMENT=Enter Test System: NAME=P-TS MAX_LENGTH=2 DATA_TYPE=STRING [PROMPT] STATEMENT=Enter Sample Weight NAME=P-MG MAX_LENGTH=7 DATA_TYPE=STRING [FORMAT] STATEMENT=MAX_LENGTH=9 NAME=F-DATE DATA_TYPE=STRING [FORMAT] STATEMENT= " " ", " MAX_LENGTH=18 NAME=F-MONTH DATA_TYPE=STRING [END_VARS]
{
/* datetime.pl, an example of date manipulation.*/
datetime dt;
dt= SYSDATE;
prompt("dt with timestamp : "
^^to_char(dt,"DD-MON-YY HH:MI:SS") );
/* Prints: dt with timestamp : 08-DEC-97 10:26:08 */
dt= to_date(to_char(SYSDATE,"DD-MON-YY") );
prompt("dt without timestamp: "
^^to_char(dt,"DD-MON-YY HH:MI:SS"));
/* Prints: dt without timestamp: 08-DEC-97 00:00:00 */
dt= to_date(SYSDATE,"DD-MON-YY");
prompt("dt without timestamp: "
^^to_char(dt,"DD-MON-YY HH:MI:SS")^^" ?????");
/* Prints: dt without timestamp: 08-DEC-97 10:27:01 ??????*/
}
Winprop() can be used to change fonts in a window.
default_file c:\trifox\lib\wrcis.vgdFinally, call guicis.ini from the command line:
C:\TRIFOX\bin\gcmnod32.exe -ic:\trifox\lib\guicis.ini
else { /* normal mode */
input(G.input_var);
...
if (G.key == key_f1) ...
else if (G.key == key_f2)...
else if ...
else if (G.key in (key_help,key_lov)){
key_exec(G.key);
}
else if ...
}
} /* normal mode */
{
trigger help= {
list mail_lst;
mail_lst= list_open("27",3, "Ship: Shipment Priority");
list_mod(mail_lst,1,"R: Routine, 1 week delivery");
list_mod(mail_lst,1,"E: Express, 1 day delivery");
list_mod(mail_lst,1,"Format: C | LOV: [F11]");
list_view3(mail_lst,-1,-1,-1,key_f3,opt_highlight,0);
mail_lst= NULL;
};
;
}
{
/* STRUCTURE() creates a Graphic List */
list ll;
file_copy("c:\trifox\cache\228277b.bmp","gui!image:theimage.bmp");
ll = list_open("60",1);
list_mod(ll,1,"0 8 0 0 9999 9999 THEIMAGE");
return(ll);
}
The space delimited string "0 8 0 0 9999 9999 THEIMAGE" defines the chracteristics of the image canvas and reading left to right:
... struct.structure = structure(); /* create graphics list;assign it to struct.structure */ window(struct,open); list_view2(struct.structure,-1,-1,-1,0);Finally, set the user attributes in the SMILES field of the calling window to 'Calculate' (right click SMILES field to get Define Field Dialogue, click Attributes and select Calculate). With 'Calculate' on the field trigger for SMILES will be executed and the structure for the new SMILES will be displayed.
# INI files list the environmental variables used by the CIS. # Note that spaces (not tabs) are used as delimiters between # env vars and their values and that comments begin with #. # You must edit the ip addresses, paths, filenames, usernames # and passwords to fit the configuration of your client. #Configuration server_os 0 #nt=0, unix=1, vms=2 client_os 0 #nt/95=0, un=1, s8=3; 3.1=9 trim_config 0 #fat=0,thin=1,java=2 #Paths to helper applications on client acrobat c:\Acrobat3\Reader\AcroRd32.exe browser c:\Program Files\NETSCAPE\Communicator\PROGRAM\netscape.exe chemdraw c:\chemoffice\chemdraw\chemdraw.exe #Delete path if not installed excel c:\Program Files\Microsoft Office\Office\EXCEL.EXE raswin_dir c:\raswin\ #HTML help ras_manual http://www.umass.edu/microbio/rasmol/distrib/rasman.htm #URL to Rasmol manual trim_help http://www.trifox.com/trimpl/index.html # URL to Trim functions da_help http://xxx.xxx.xxx.xxx/dapl/index.html # URL to DataAspects functions devnotes http://xxx.xxx.xxx.xxx/devnotes/devnotes.html # URL to DataAspects functions chemnet http://xxx.xxx.xxx.xxx/chemnet.html # URL to DataAspects functions # Thin Client configuration with all help & reference files on application server #widgets_dir /usr2/trim/widgets/ # path to widget gif files #cache_dir gui!c:\daspects\cache\ # save helper files on client: pdf,dynamic html,pdb #path c:\daspects\cache\ # same as cache_dir, but w/o 'gui!' #cis_dir /usr2/trim/cis/ # path to application run files #help_dir /usr2/trim/help/ # path HTML help on applications #user_dir /usr2/trim # user hit lists; username appended in main.trg # Fat Client configuration with all help & reference files on client. # Note: Do not preceed the path with gui! widgets_dir c:\trifox\widgets\ # path to widget gif files cache_dir c:\trifox\cache\ # prepend 'GUI!' in thin client athena.ini path c:\trifox\cache\ # path to cache for both thin & fat client cis_dir c:\trifox\cis\ # path to CIS run files help_dir c:\trifox\help\ # path to help files user_dir c:\trifox\cojo # user hit lists; username appended in main.trg # CISSERVER: Connection to biology/inventory database # Oracle db from outside firewall cisserver net:username/password@1958:xxx.xxx.xxx.xxx!/usr2/trim/bin/vtxhost.net,TRIM_HOME=/usr2/trim@@1958:xxx.xxx.xxx.xxx(%AUTH%)!/usr2/trim/bin/vtxhost.ora,ORACLE_HOME=/usr4/oracle,ORACLE_SID=A # Oracle db from inside firewall # cisserver net:username/password@1958:xxx.xxx.xxx.xxx(%AUTH%)!/usr2/trim/bin/vtxhost.ora,ORACLE_HOME=/usr4/oracle,ORACLE_SID=A # APPSERVER: Connection to the application server appserver net:moose@xxx.xxx.xxx.xxx(%AUTH%)!/usr2/trim/bin/vtxhost.fcp # IMAGESERVER: Connection to the image server #imageserver net:sql$database@1958:xxx.xxx.xxx.xxx(username/password)!d::\trifox\bin\vtxfcp # CHEMSERVER: Connection to the Daylight server chemserver http://www.daylight.com/ #Daylight # chemserver http://xxx.xxx.xxx.xxx/ #My DAYcgi # Parameters for Daylight databases day_parms &datatype=SMI&dbname=cis&dbpw=cheminfo&uname=dayuser&upw=cheminfo # Parameters for installing Mettler Balance balance 1 # Balance: not installed= 0; installed= 1 port com2 # Com port (com1, com2, com3, etc) baud 9600 # Baud rate for com port (2400, 4800, 9600, etc) parity 2 # Parity (0= no parity; 1= odd; 2= even; 3= mark; 4= space) bits 8 # bits per byte (4,5,6,7, or 8) flow 0 # flow control (0= hardware (DTR/CTS); 1= Xon/Xoff) outfile c:\daspects\cache\fm_bal.txt # stores data returned from balance }
The TRIMtools GUI can be configured as either a thin client or a fat client. Thin client means that the client PC is used simply as a presentation manager. In this mode, only three or four files that consume around 100kb of disk space are stored on the client PC while the remaining TRIMtoos and CIS applications are stored on the server.
In contrast, fat clients have all TRIMtools and/or all CIS applications on the client. Fat clients can be configured in two ways to either create an environment for the software developer or for the end user. For developers, all TRIMtools and CIS applications are installed on the PC making a very fat client. For the end user, the installation of MIR files (Machine Independent Run files) reduces the number of files to the CIS applications to simplify installation and maintenance.
Each configuration has its advantages and disadvantages. Since thin clients get most of their information from the server, display refresh rates are vulnerable to network and modem baud rates. On the other hand, fat clients get most of their data from the local hard drive except when interacting with the database server. From a CIS management point of view, thin clients are preferable because there is only one copy of each application located on the server which simplifies version updates. Conversely, each fat client stores all CIS applications and new version must be copied onto the hard drive of each client. In summary, deploy thin clients when network transmission rates refresh screen displays at an acceptable speed. Deploy fat clients on remote computers operating over slow networks and modems.
These instructions focus on the following installation topics:
These instructions assume that the following software has been already been installed on the server and/or client computers:
| [prod.trifox.prod] | accession.gap, balance.gap, merck.gap, track.gap, request.gap, ship.gap, start.gap |
| [prod.trifox.cis] | accession.run, balance,merck.run, track.run, request.run. ship.run, start.run, biotable.txt, merckwr.txt, pdwr.txt, stectwr.txt, trsmalwr.txt, trsradwr.txt |
| [prod.trifox.help] | aboutcis.htm, chemnet.htm, devnotes.htm, gaphelp.htm, support.htm |
| [TRIMhome.lib] | gui.fnc, import.h, net.ini |
| c:\trifox\bin | gcmnod32.exe (32 bit client), gcmnode.exe (16 bit client),gcvt.exe |
| c:\trifox\bmp | blank.bmp,dnarrow.bmp,uparrow.bmp |
| c:\trifox\cache | stores temporary files downloaded from server |
| c:\trifox\lib | anthena.ini,gui.ini,guicis.ini,wrcis.vgd |
| c:\trifox\lists | stores lists of structures created by user |
| c:\trifox\queries | stores extended queries created by user |
| c:\trifox\ship | stores shipping documents created by user |
| c:\trifox\spreadsheets | stores delimited files created by user |
Note that the ip addresses used in guicis.ini differ according to the location of the client relative to the WRAIR firewall.
The following guicis.ini is set to run a thin client outside the WRAIR firewall.
rem ---------- Trifox Virtual GUI Specifics for Thin Client Connection to WRAIR env_vars TRIM_HOME=dka0:[trim],WRCIS.INI=gui!c:\trifox\lib\wrcis.ini hostname 141.236.12.10 --Thin client outside firewall !hostname 141.236.20.10 --Thin client inside firewall working_directory dka0:[prod.trifox.cis] --ETCIS Server program dka0:[prod.trifox.cis]start.run --opening program parameters start --start.run opening application packetsize 4096 --network packet (send/recv) port 1959 --THIN CLIENT guiserver daemon port default_file c:\trifox\lib\wrcis.vgd --font file
An example of a WRCIS.INI file follows.
!WRCIS.INI lists the environmental variables used by the CIS. !Note that the following variables and their corresponding values !must be separated with 'spaces' not 'tabs' and that an exclamation !mark is used to 'comment out' a line. platform nt !Client Operating system: nt, 95, 31 client thin !Client = fat, thin location 1 !Inside WR firewall= 0, outside= 1 bar_code 1 !Bar Code Software not installed= 0, installed= 1 !Parameters for Daylight Chemical Database day_parms &datatype=SMI&dbname=cis&dbpw=cheminfo&uname=dayuser&upw=cheminfo !Paths to helper applications acrobat c:\Acrobat3\Reader\AcroRd32.exe browser c:\Program Files\NETSCAPE\Navigator\PROGRAM\netscape.exe !Parameters for installing Mettler Balance. balance 1 ! Balance: not installed= 0; installed= 1 port com2 ! Com port (com1, com2, com3, etc) baud 9600 ! Baud rate for com port (2400, 4800, 9600, etc) parity 2 ! Parity (0= no parity; 1= odd; 2= even; 3= mark; 4= space) bits 8 ! bits per byte (4,5,6,7, or 8) flow 0 ! flow control (0= hardware (DTR/CTS); 1= Xon/Xoff) outfile c:\trifox\cache\fm_bal.txt ! stores data returned from balance !Thin client configuration with all help/reference files on ETCIS server cache_dir c:\trifox\cache\ raswin_dir c:\raswin\ ship_dir c:\trifox\ship\ cis_dir dka0:[prod.trifox.cis] help_dir dka0:[prod.trifox.help] mass_dir dka0:[prod.trifox.massspec] run_dir dka0:[prod.trifox.run] sri_dir dka0:[prod.trifox.sri] sweeney_dir dka0:[prod.trifox.sweeney] cisserver net:sql$database@141.236.20.10(%AUTH%)!ljk chemserver http://141.236.12.11/ !Fat client configuration to WR with all help/reference files on client !cache_dir c:\trifox\cache\ !raswin_dir c:\raswin\ !ship_dir c:\trifox\ship\ !cis_dir c:\trifox\cis\ !help_dir c:\trifox\help\ !mass_dir c:\trifox\massspec\ !run_dir c:\trifox\run\ !sri_dir c:\trifox\sri\ !sweeney_dir c:\trifox\sweeney\ !cisserver net:sql$database@141.236.12.10(%AUTH%)!ljk !chemserver http://141.236.12.11/ !Fat client configuration with all help/reference files on ETCIS Server !cache_dir c:\trifox\cache\ !cis_dir c:\trifox\cis\ !raswin_dir c:\raswin\ !ship_dir c:\trifox\ship\ !help_dir dka0:[prod.trifox.help] !mass_dir dka0:[prod.trifox.massspec] !run_dir dka0:[prod.trifox.run] !sri_dir dka0:[prod.trifox.sri] !sweeney_dir da0:[prod.trifox.sweeney] !cisserver net:sql$database@141.236.12.10(%AUTH%)!ljk !chemserver http://141.236.12.11/ !Walter Reed SHIVA connection: !cisserver net:sql$database@141.236.20.10(%AUTH%)!ljk! !chemserver http://141.236.20.11/ !Daylight Server: !chemserver http://207.71.104.130/
Machine Independent Run (MIR) files run as stand alone applications without the TRIM library (gui.fnc, gui.h, trim.h, etc.). By eliminating the TRIM library, the number of files on the fat client are minimized and installation is simplified. In addition, MIR files exclude unnecessary code such as programmer's comments so they are actually smaller than the original source file. Finally, the use of MIR files guarantees that the end user will not change your code.
There are two steps to making MIR files. Open a Command Prompt Window, go to the directory containg the ASCII source applications and follow these steps:
| c:\daspects\bin | cexuser.dll, gcvt.exe, guirun.exe, msvcrt.dll, scale.exe, vtx3.exe, vtx.dll, WRCIS icon |
| c:\daspects\bmp | blank.bmp, dnarrow.bmp, uparrow.bmp |
| c:\daspects\cache | empty |
| c:\daspects\cis | accession.run, address.run, balance.run, merck.run, request.run, ship.run, start.run, track.run biotable.txt, merckwr.txt, pdwr.txt, stectwr.txt, trsmalwr.txt, trsradwr.txt |
| c:\daspects\help | aboutcis.htm, chemnet.htm, devnotes.htm, gaphelp.htm, support.htm |
| c:\daspects\lib | gui.ini, gui.msg, wrcis.ini, wrcis.vgd |
| c:\daspects\ship | empty |
| c:\trifox\lib | CIS: gui.fnc, gui.dft, guicis.ini, import.h, wrcis.ini, wrcis.vgd TRIMtools: net.ini, gui.cc, gui.ini, gui.csf, gui.h, gui.key, gui.kma, gui.msg, gui.pev,gui.uat, gui.vis |
| c:\trifox\prod | CIS: accession.gap, balance.gap, merck.gap, request.gap, ship.gap, start.gap, track.gap |
| c:\trifox\cis | CIS: accession.run, balance.run, merck.run, request.run, ship.run, start.run, track.run CIS: biotable.txt, merckwr.txt, pdwr.txt, stectwr.txt, trsmalwr.txt, trsradwr.txt |
| c:\trifox\help | CIS: aboutcis.htm, chemnet.htm, devnotes.htm, gaphelp.htm, support.htm |
| c:\trifox.bin | TRIMtools: scale.exe, gcvt.exe, guiapp.exe, guirun.exe, guimsg32.exe, vtx3.exe, vtx3.dll, vtxping.exe, trimgen.exe |
{
g.bal_pu_list= NULL;
list_mod(g.bal_pu_list,1,"Send",41); /* key 41 Create file to_bal.txt */
list_mod(g.bal_pu_list,1,"Exit F3",3); /* key_f3 Exit application */
list_mod(g.bal_pu_list,1,"",0); /* Displays line in popup menu */
list_mod(g.bal_pu_list,1,"Copy Ctrl+C",38); /* key 38 Copy to clipboard */
list_mod(g.bal_pu_list,1,"Cut Ctrl+X",39);/* key_39 Cut fld; copy to clip */
list_mod(g.bal_pu_list,1,"Paste Ctrl+V",40); /* key_40 Paste from clip to fld */
list_mod(g.bal_pu_list,1,"",0); /* Displays line in popup menu */
list_mod(g.bal_pu_list,1,"LOV F11",key_lov);
list_mod(g.bal_pu_list,1,"Help F12",key_help);
}
else { /* normal mode */
input(G.input_var);
if (G.modified) move_f2l(0); /* update window list (if needed) */
if (G.key == key_f3) break; /* default Quit key */
else if (G.key in (key_help,key_lov))
key_exec(G.key); /* execute the key trigger */
...
else if (G.key == key_41) /* exchange data with balance */
send(); /* see user triggers */
} /* normal mode */
if (G.key in (key_38,key_39,key_40)) /* copy,cut,paste field_d */
clip(); /* see gui.fnc */
} /* while loop forever */
...
if (G.error_code) { /* an error occured ? */
...
}
else {
...
load_bal_pu_list(); /* load g.bal_pu_list into popup */
popup_menu(popup_load,g.bal_pu_list); /* load popup menu */
}
while (true) { /* loop forever */
...
{
g.key= list_ixed(g.bal_pu_list,g.aux,1); /* assign user's choice to g.key */
escape(input); /* exit to the window trigger */
}
{
/*
This trigger fires formates a query using child/sibling variables and
fires this query in the parent/caller window.
Actions:
1. Determine if query is originating with parent or child.
2. If it is originating in the child then:
a. Construct an 'in' predicate using BNs from child window
b. Save values in query fields of child. (why do this?)
c. Run filter. (why do this?)
d. Run query trigger in parent using g.query_buf.
Problems:
1. What does g.save_val do? It is a flag for the field triggers:
{
char save_val[128];
if (g.save_val) save_val= field_d;
else field_d = save_val;
}
Pat McGreevy, 16 Feb 98
*/
int from_parent;
from_parent = true; /* initialize true */
/* if child in normal mode (p.mode=false) parent is calling so clear child */
if (!p.mode) { p.ar = 0; field_set(NULL); } /* clear if parent calling */
else { /* parent not calling */
query(query_max); /* run child query */
if (list_rows(p.wl)) { /* did child select returned data?*/
g.query_buf = NULL;
g.query_buf = "a.an in ("; /* start 'in' predicate */
while (list_rows(p.wl)) { /* append child variables */
g.query_buf = g.query_buf ^^ list_curr(p.wl,@p.bn);
list_mod(p.wl,0); /* delete curr row in child wl */
if (list_rows(p.wl)) g.query_buf = g.query_buf ^^ ",";
}
g.query_buf = g.query_buf ^^ ")"; /* finish 'in predicate' */
p.mode = 0; /* set child to normal mode */
g.save_val = true; /* set flag to save child fields */
field_exec(uat_noquery,false); /* save values in child qry flds */
/* window(start,query); run parent query/use g.qry_buf */
if (prompt("Filter results [N]: ") == "Y") {
g.save_val = false; /* reset save_val flag false */
field_set(NULL); /* clear child fields */
field_exec(uat_noquery,false); /* exe trg in child query fields */
from_parent = true;
g.save_val = true;
}
else from_parent = false;
}
refresh(false); /* turn off refresh temporarily */
}
if (from_parent) { /* run child query again ? */
status("Query in progress");
cursor_wait(true);
query(query_max,"a.bn = "^^start.bn);
status(query_count(G.query_buf)^^" rows returned");
G.query_buf = NULL; /* reset query_buf */
edit_win(p.wl,edt_refresh,false); /* refresh the window */
if (child) window(child,query); /* CHANGE TO RUN ONLY RUN IF OPEN */
else refresh(true);
}
}
G.key = decode(focus(true),parent,key_f3,
child ,key_nextblock,
9999);
{
G.tw = focus(true);
G.key = decode(G.tw,parent,key_f3,
child ,key_nextblock,
9999);
}
}
while (true) { /* loop forever */
}
g.tw = current;
while (true) { /* loop forever */
while (g.tw != current) { i = g.tw; g.tw = current; window(i,run); }
3. In Structure window trigger:
{ /* User window trigger */
list dl; /* delete list */
int mode; int rows; /* window mode, rows per row */
int i; int j; /* loop variables */
char val_wrno[6]; /* USED IN WRNOVAL() */
char val_bn[7]; /* USED IN BNVAL() */
while (true) {
raw_input();
if (G.key in (key_quit,9999)) break;
}
if (G.key != 9999)
window(current,close);