Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder Public Beta Tests » View Thread |
Messages 1 to 5 of 5 total |
EWB 3 Build 7 - IF with Boolean causes problem in Forms |
Sun, Mar 22 2020 3:21 PM | Permanent Link |
Rob Frye | Testing a Boolean value in an IF statement, will stop a form from displaying when it is run. Just being in the source code causes the problem even if the IF statement is never actually called.
For example - create a Visual Client Project set the form Background.Color (so that it should be visible when run) add a Click event procedure to the form class within the procedure add a boolean variable and an IF statement referencing it running the project results in a blank page unit Unit1; interface uses WebCore, WebUI, WebForms, WebCtrls; type TForm1 = class(TForm) procedure Form1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation procedure TForm1.Form1Click(Sender: TObject); var sw: Boolean; begin sw := True; if (sw) then ShowMessage('TRUE'); end; end. |
Sun, Mar 22 2020 4:31 PM | Permanent Link |
Raul Team Elevate | On 3/22/2020 3:21 PM, Rob Frye wrote:
> Testing a Boolean value in an IF statement, will stop a form from displaying when it is run. Just being in the source code causes the problem even if the IF statement is never actually called. > > For example - > > create a Visual Client Project > set the form Background.Color (so that it should be visible when run) > add a Click event procedure to the form class > within the procedure add a boolean variable and an IF statement referencing it > running the project results in a blank page This works OK for me as long as i don't change background colour - i.e. i think issue is setting form background and not boolean value Raul |
Sun, Mar 22 2020 6:48 PM | Permanent Link |
Rob Frye | Raul wrote:
> This works OK for me as long as i don't change background colour - i.e. > i think issue is setting form background and not boolean value > > Raul No, I don't believe it is related to setting the background color. If you start with a new TForm and don't set any properties at all, the problem still occurs. It just isn't as obvious because the form would be transparent. I believe if you try clicking on the form, you will still see that it isn't working properly because the message box won't be displayed. Further, if you replace "if (sw) then" with "if (sw = True) then" you will see the problem goes away. Rob |
Mon, Mar 23 2020 4:26 AM | Permanent Link |
Matthew Jones | I've not had time to play much with theeh Betas, but I'd want to look at the emitted code. What's wrong with it? What console errors are shown?
|
Thu, Mar 26 2020 5:12 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Rob,
<< Testing a Boolean value in an IF statement, will stop a form from displaying when it is run. Just being in the source code causes the problem even if the IF statement is never actually called. >> This is now fixed. It was a simple JS emitting issue where certain types of expression were not emitting any wrapped parentheses properly. Thanks ! Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, March 28, 2024 at 06:05 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |