model_server/gala/src/dis_cmds.cxx
//-----------------------------------------------------------------------------------------------------
// <text>  <-  <name> <index>
//
// This function will return the text line located at the spesified index.
//-----------------------------------------------------------------------------------------------------
  <-   
This function will return the text line located at the spesified index.
< - This function will return the text line located at the spesified index .
int dis_gdTextSpinGetTextAt(ClientData, Tcl_Interp* interp, int argc, char *argv[]) {
   if (argc != 3) {
	  Tcl_SetResult (interp, "wrong number of arguments", TCL_STATIC);
	  return TCL_ERROR;
   }
   gdTextSpinner *spinner = (gdTextSpinner *)dis_findItem(interp, (vchar*) argv[1]);
   if(!spinner)  TCL_EXECERR1 ("Text spinner was not found", argv[1]);
   int line = atoi(argv[2]);
   if( line<0 || spinner->GetTextCount()<= line) {
	 Tcl_SetResult (interp, (char *)"passed line out of range", TCL_STATIC);
     return TCL_ERROR;
   }
   Tcl_SetResult (interp, (char *)spinner->GetTextAt(line), TCL_STATIC);
   return TCL_OK;
}
int dis_gdTextSpinGetTextAt ( ClientData , Tcl_Interp * interp , int argc , char * argv [ ] ) { if ( argc != 3 ) { Tcl_SetResult ( interp , " " , TCL_STATIC ) ; return TCL_ERROR ; } gdTextSpinner * spinner = ( gdTextSpinner * ) dis_findItem ( interp , ( vchar * ) argv [ 1 ] ) ; if ( ! spinner ) TCL_EXECERR1 ( " " , argv [ 1 ] ) ; int line = atoi ( argv [ 2 ] ) ; if ( line < 0 || spinner -> GetTextCount ( ) <= line ) { Tcl_SetResult ( interp , ( char * ) " " , TCL_STATIC ) ; return TCL_ERROR ; } Tcl_SetResult ( interp , ( char * ) spinner -> GetTextAt ( line ) , TCL_STATIC ) ; return TCL_OK ; }
<text>  <-  <name> <index>
This function will return the text line located at the spesified index.
<text > < - <name > <index > This function will return the text line located at the spesified index .