model_server/gala/src/dis_cmds.cxx
//-----------------------------------------------------------------------------------------------------
// <text>  <-  <name> <text>
//
// This function will return the text the index of the spesified line
//-----------------------------------------------------------------------------------------------------
  <-   
This function will return the text the index of the spesified line
< - This function will return the text the index of the spesified line
int dis_gdTextSpinGetIndexFromText(ClientData, Tcl_Interp* interp, int argc, char *argv[]) {
   if (argc != 3) {
	  Tcl_SetResult (interp, (char *)"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 index = spinner->FindTextIndex((unsigned char *)argv[2]);
   gString result_str;
   result_str.sprintf((vchar *)"%d", index);
   Tcl_SetResult (interp, (char *)result_str, TCL_VOLATILE);
   return TCL_OK;
}
int dis_gdTextSpinGetIndexFromText ( ClientData , Tcl_Interp * interp , int argc , char * argv [ ] ) { if ( argc != 3 ) { Tcl_SetResult ( interp , ( char * ) " " , TCL_STATIC ) ; return TCL_ERROR ; } gdTextSpinner * spinner = ( gdTextSpinner * ) dis_findItem ( interp , ( vchar * ) argv [ 1 ] ) ; if ( ! spinner ) TCL_EXECERR1 ( " " , argv [ 1 ] ) ; int index = spinner -> FindTextIndex ( ( unsigned char * ) argv [ 2 ] ) ; gString result_str ; result_str . sprintf ( ( vchar * ) " " , index ) ; Tcl_SetResult ( interp , ( char * ) result_str , TCL_VOLATILE ) ; return TCL_OK ; }
<text>  <-  <name> <text>
This function will return the text the index of the spesified line
<text > < - <name > <text > This function will return the text the index of the spesified line