###########################################################################
# TSL-LIBRARY:	EMOS_FRM_TBL_Lib
###########################################################################
# Copyright (C) 2003  EMOS Computer Consulting GmbH
# All rights reserved.
#
# For further information please contact:
#
#	Dean Rajovic
#	EMOS Computer Consulting GmbH
#	Oskar-Messter-Strae 25
#	85737 Ismaning
#	Germany
#	tel.: +49 89 608 765-0
#	mailto:drajovic@emos.de
#	http://www.emos.de
###########################################################################
# $Revision: 1.1 $
# $Author: drajovic $
# $Date: 2003/03/27 12:36:27 $
# $Source: d:/Archive/CVS_QS/EMOS/EMOS_NAT/WR/NAT/emos_frm_nat_lib/script,v $
# $NoKeywords: $
###########################################################################

#/***
#* This library contains function specially designed fro processing table
#* objects. In this respect this library extends the funtionallity of the
#* standard emos_frm_gui_lib.
#* <p>NOTE<br>
#* These functions obey the rules of EMOS Framework (i.e. error logging,
#* error processing, FRM modes, etc.). To understand these concepts
#* you should study and understand emos_frm_gui_lib before you attempt
#* to add your own logic. 
#* @author drajovic
#*/

#/**
#* Performs table action(s) on a 1-dimensional block of table cells.
#*
#* @param tid	(in)	id of the table where the instructins come from
#* @param test	(in)	name of the test to run (as named in column "Name")
#* @param obj	(in)	table object where actions are to be performed
#* @param desc (in) [optional] phisical descr. of the object contained in the table cell
#* @param desc (in) [optional] phisical descr. of the list element of the combo box
#* @return E_OK if success, else error
#*/

public function FRM_TBL_set_data ( in tid, in test, in obj, in desc, in list )
{
	auto val, mode, rc;
	auto rc2 = E_OK;
	while( ( rc = FRM_get_next( tid, test, val )) == E_OK )
	{
		wrlog_prim_start();
		FRM_log_frm_info( tid, test, val );
		mode = FRM_get_mode( tid );
		switch( mode )
		{
		case FRM_SET_MODE:
		case FRM_CHK_MODE:
#			rc2+=TBL_FRM_cell_action( obj, val, mode, desc, list );
			report_msg( sprintf( "\"%s\" not performed in a demo (not free of charge)", val ) );
			break;
		case FRM_ATR_MODE:
		case FRM_GEN_MODE:
			# not implemented
		default:
			break;
		}
		wrlog_prim_stop( rc2 );
	}
	if ( rc == E_FRM_SKIP || rc == E_OUT_OF_RANGE )  # empty or EOF
		rc = E_OK;
	# if one or the other rc variable <> 0, return error
	if ( rc2 != E_OK )
		return rc2;
	return rc;
}

#/**
#* Performs table action(s) on a 2-dimensional block of table cells.
#*
#* @param tid	(in)	id of the table where the instructins come from
#* @param test	(in)	name of the test to run (as named in column "Name")
#* @param obj	(in)	table object where actions are to be performed
#* @return E_OK if success, else error
#*/

public function FRM_TBL_set_data_block ( in tid, in test, in obj )
{
	# not shown here
	report_msg( "not performed in a demo (not free of charge)" );
	return E_OK;
}
