S Scantech Well-Known Member Licensed User Longtime User Mar 26, 2019 #1 This is actually a bug i spotted with statement being true based on adding a log or not. Try attached file. Follow these steps Disable the log("THIS WILL TRIGGER TRUE STATEMENT") Run the app observe the Value (Value = "Im False Statement") Now, Enable the Log("THIS WILL TRIGGER TRUE STATEMENT") Run the app observe the Value (Value = "IM True Statement") This is only caused by not using lv = GetDeviceLayoutValues Click to expand... Even if not using it, it should not cause statement issues as i observed. There should be a warning message or something MUST use with 10inch Emulator Attachments If Statement.zip If Statement.zip 8.2 KB · Views: 444 Last edited: Mar 26, 2019
This is actually a bug i spotted with statement being true based on adding a log or not. Try attached file. Follow these steps Disable the log("THIS WILL TRIGGER TRUE STATEMENT") Run the app observe the Value (Value = "Im False Statement") Now, Enable the Log("THIS WILL TRIGGER TRUE STATEMENT") Run the app observe the Value (Value = "IM True Statement") This is only caused by not using lv = GetDeviceLayoutValues Click to expand... Even if not using it, it should not cause statement issues as i observed. There should be a warning message or something MUST use with 10inch Emulator
Erel B4X founder Staff member Licensed User Longtime User Mar 26, 2019 #2 Moved to the questions forum. It is not related to the log command or the if statement. Accessing an uninitialized LayoutValues object is a programming mistake. Your code causes a division by 0. The difference in the behavior is related to the debugger pipeline. You can see it by cleaning the project after you make a change. Anyway, I will make this method (ApproximateScreenSize) throw an exception when the Scale is zero. Upvote 0
Moved to the questions forum. It is not related to the log command or the if statement. Accessing an uninitialized LayoutValues object is a programming mistake. Your code causes a division by 0. The difference in the behavior is related to the debugger pipeline. You can see it by cleaning the project after you make a change. Anyway, I will make this method (ApproximateScreenSize) throw an exception when the Scale is zero.