Alessandro71 Well-Known Member Licensed User Longtime User Mar 10, 2023 #1 supporting #if B4i/B4A in designer scripts will allow maintaining a single copy of the script while copying/pasting between environments
supporting #if B4i/B4A in designer scripts will allow maintaining a single copy of the script while copying/pasting between environments
toby Well-Known Member Licensed User Longtime User Mar 10, 2023 #2 Alessandro71 said: supporting #if B4i/B4A in designer scripts will allow maintaining a single copy of the script while copying/pasting between environments Click to expand... It's already implemented. To test it, create a blank b4xpage project and paste following script into the script window. B4X: #if DEBUG Button1.Text="Debug mode" #else Button1.Text="Release mode" #end if You can also run the attached test project. Attachments designerIfCondition.zip 14.2 KB · Views: 63
Alessandro71 said: supporting #if B4i/B4A in designer scripts will allow maintaining a single copy of the script while copying/pasting between environments Click to expand... It's already implemented. To test it, create a blank b4xpage project and paste following script into the script window. B4X: #if DEBUG Button1.Text="Debug mode" #else Button1.Text="Release mode" #end if You can also run the attached test project.
Alessandro71 Well-Known Member Licensed User Longtime User Mar 11, 2023 #3 toby said: It's already implemented. Click to expand... you are right i was fooled by the editor, which does not gray out the code of the other branch
toby said: It's already implemented. Click to expand... you are right i was fooled by the editor, which does not gray out the code of the other branch