/**
 * Classe: Mensage
 *         =======
 *
 */
function Mensage()
{
  /**
   *  Propriedades ==========================================================
   */
  this.statusCMD;
  this.root = _getPathUnit( "rpcStudio.js" );
  this.path = this.root.substr( 0, this.root.indexOf( 'lib_JS' ) ) + 'core/';

/**
 *  Metodos  ==============================================================
 */
   
/* metodo teste  -----------------------------------------------------  */
  this.teste = function( txt ) {
    var callId = jsrsCall( this.path + "rpcServer.Studio.php",
                                       "Mensage._teste",
                                       "MsgServer.read",
                                       txt,
                                       false );
  }// End function
  this._teste = function( text, callId ) {
    alert( 'Teste: ' + text );
  }


/**
 *  setDBgrid_col()
 */
  this.setDBgrid_col = function( txt ) {
    var callId = jsrsCall( this.path + "rpcServer.Studio.php",
                                       "Mensage._setDBgrid_col",
                                       "MsgServer.set_dbgrid_col",
                                       txt,
                                       false );
  }// End function
  this._setDBgrid_col = function( text, callId ) {

    objDOM.value = text;
  }


/* metodo send  -----------------------------------------------------  */
  this.send = function( txt ) {
    var callId = jsrsCall( this.path + "rpcServer.Studio.php",
                           "Mensage._backSend",
                           "MsgServer.teste",
                           txt,
                           false );
//alert('Texto: '+txt);
  }// End

/* metodo _backSend  ------------------------------------------------  */
  this._backSend = function( text, callId ) {
    
    arr = text.split( '#' );

    if( arr[0] == '1' )
    {
      alert( "back:[" + text + "]" );
    }else
    {
      alert( 'Erro[_backSend] ' + arr[2] );

    }// End

  }  

/* metodo exeCMD  ---------------------------------------------------  */
  this.exeCMD = function( txt )
  {
    var callId = jsrsCall( "rpcServer.Studio.php",
                           "Mensage._statusCMD",
                           "MsgServer.exec_cmd",
                           txt,
                           false );
  }// End

/**
 *  function _statusCMD()  ------------------------------------------------  //
 */  
  this._statusCMD = function( text, callId ) {
    alert( 'ret: ' + text );
  }// End


}// End function Mensage()


var Mensage = new Mensage(); // Pseudo static

