]> Creatis software - bbtk.git/commitdiff
#3536 Bug StringTo
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 17 Jun 2025 13:03:38 +0000 (15:03 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 17 Jun 2025 13:03:38 +0000 (15:03 +0200)
packages/std/src/bbstdStringTo.cxx
packages/vtk/src/bbvtkCreateImage.h
packages/wx/src/bbwxCommandButton.h

index 09de441..055e60e 100644 (file)
@@ -49,24 +49,25 @@ namespace bbstd
   // Template specialization of DoIt
   template <> void StringTo<bool> ::DoIt()
   {
-    if ( (bbGetInputIn()=="true") || 
+    if ( (bbGetInputIn()=="true") ||
          (bbGetInputIn()=="TRUE") || 
          (bbGetInputIn()=="True") || 
          (bbGetInputIn()=="1")     )  
     {
-       bbSetOutputOut(true);
-    }
-    else if ( (bbGetInputIn()=="false") || 
-              (bbGetInputIn()=="FALSE") ||
-              (bbGetInputIn()=="False") ||
-              (bbGetInputIn()=="0") )  
+        bbSetOutputOut(true);
+    } else if ( (bbGetInputIn()=="false") ||
+              (bbGetInputIn()=="FALSE")   ||
+              (bbGetInputIn()=="False")   ||
+              (bbGetInputIn()=="0") )
     {   
-       bbSetOutputOut(false); 
-    }
-    else 
-    {
-       bbtkError("cannot convert '"<<bbGetInputIn()<<"' to a bool");
+        bbSetOutputOut(false);
+    } else {
+        printf("EED StringTo box  cannot convert  >>%s<<\n", bbGetInputIn().c_str() );
+//        bbtkError("cannot convert '"<<bbGetInputIn()<<"' to a bool");
+        bbSetOutputOut(true);
+
     }
+        printf("EED StringTo 5\n");
   }
   
   // Template specialization of DoIt
index 59de767..385dcf5 100644 (file)
@@ -72,7 +72,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(CreateImage,bbtk::AtomicBlackBox);
        
        BBTK_NAME("CreateImage");
        BBTK_AUTHOR("Info-Dev");
-       BBTK_DESCRIPTION("(C++,Python)Create a new vtkImageData");
+       BBTK_DESCRIPTION("(C++,Python,JavaScript) Create a new vtkImageData");
        BBTK_CATEGORY("Filter");
        
        BBTK_INPUT(CreateImage,Dimensions,"[SizeX SizeY SizeZ] of the image ([250 250 250] default)",std::vector<int>,"");
index aa4ac32..eb4b68e 100644 (file)
@@ -88,7 +88,7 @@ namespace bbwx
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WxBlackBox); 
   BBTK_NAME("CommandButton"); 
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); 
-  BBTK_DESCRIPTION("Button which executes bbi commands"); 
+  BBTK_DESCRIPTION("(C++,JavaScript) Button which executes bbi commands"); 
   
   typedef std::vector<double> vectorcolour;