Salome HOME
Debug
authorouv <ouv@opencascade.com>
Thu, 17 Dec 2009 10:16:04 +0000 (10:16 +0000)
committerouv <ouv@opencascade.com>
Thu, 17 Dec 2009 10:16:04 +0000 (10:16 +0000)
src/Notebook/SALOME_EvalSet.cxx
src/Notebook/SALOME_EvalVariant.cxx
src/Notebook/SALOME_Notebook.cxx
src/Notebook/SALOME_Parameter.cxx
src/Notebook/Test/NotebookTest.cxx

index d6ff459300658e16fd16cb7224c3504e7aebc4c9..3dd301996ef4587492762734561d04369721b2ad 100755 (executable)
@@ -520,11 +520,10 @@ SALOME_String SALOME_EvalSetLogic::name() const
 bool SALOME_EvalSetLogic::createValue(const SALOME_String& str, SALOME_EvalVariant& val)const
 {
   bool ok = true;
-  SALOME_String valStr = toLower(str);
   //
-  if ( valStr == "true" || valStr == "yes" )
+  if ( str == "True" )
     val = SALOME_EvalVariant( true );
-  else if ( valStr == "false" || valStr == "no" )
+  else if ( str == "False" )
     val = SALOME_EvalVariant( false );
   else
     ok = SALOME_EvalSetBase::createValue( str, val );
index d0a218c76364837a864aaefa44b58ed65f4bee7f..11d4e5f41357e8987c72c160f50ca10d208851d2 100755 (executable)
@@ -342,7 +342,7 @@ bool SALOME_EvalVariant::toBool() const
          return DataValueDouble() != 0.;
   }
   else if ( aType == SALOME_EvalVariant_String ) {
-    SALOME_String aZero("0"), aFalse("false");
+    SALOME_String aZero("0"), aFalse("False");
     const SALOME_String& aStr=DataValueString();
     return !(aStr==aZero || aStr==aFalse || aStr.empty());
   }
@@ -443,7 +443,7 @@ SALOME_String SALOME_EvalVariant::toString() const
     int iX;
     //
     iX=toInt(&bOk);
-    aS= iX? "true" : "false";
+    aS= iX? "True" : "False";
   }
   else if (aType == SALOME_EvalVariant_Int) {
     sprintf(buffer, "%d", DataValueInt());
index 1382c84675a9b293202efb163b2a1f86186b88c1..0edb15c9d588538ebe84e6d829d5dc5ff1255b3f 100644 (file)
@@ -1027,7 +1027,7 @@ bool SALOME_Notebook::CheckParamName( const std::string& theParamName, std::stri
   for( int i=0, n=theParamName.length(); i<n; i++ )
     if( isspace( theParamName[i] ) )
     {
-      theMsg = "The name should not contain white symbols";
+      theMsg = "The name should not contain white spaces";
       return false;
     }
 
index 9dba0d40ade28785989318c7b16685f59292ea8f..ff11892c0d15ef0ae53d9388ed9549666d0b0462 100644 (file)
@@ -262,7 +262,7 @@ SALOME_Parameter* SALOME_Parameter::Load( SALOME_Notebook* theNotebook, FILE* th
     switch( aResType )
     {
     case SALOME_EvalVariant_Boolean:
-      return new SALOME_Parameter( theNotebook, aName, aValue=="true" );
+      return new SALOME_Parameter( theNotebook, aName, aValue=="True" );
 
     case SALOME_EvalVariant_Int:
     case SALOME_EvalVariant_UInt:
index d0f36defe4a881d785ff81a79a8b6141d5884c3f..749084af750d0f94e5e306f5cc3b2a6e32463de5 100644 (file)
@@ -203,10 +203,10 @@ void NotebookTest::testParameterString()
   aResult[1]="THE QUICK BROWN FOX JUMPS OVER A LAZY DOG";
   aResult[2]="the quick brown fox jumps over a lazy dog";
   aResult[3]="41";
-  aResult[4]="true";
-  aResult[5]="false";
-  aResult[6]="false";
-  aResult[7]="true";
+  aResult[4]="True";
+  aResult[5]="False";
+  aResult[6]="False";
+  aResult[7]="True";
   //
   aTypeR[0]=SALOME_EvalVariant_String;
   aTypeR[1]=SALOME_EvalVariant_String;