Web Core 1.7.0.1 / TWebDBCheckbox

Dear Sirs,

Delphi 10.4.2 Sydney
Web Core 1.7.0.1 (full)

We get exception on runtime if we put TWebDBCheckbox control on form and run the project.

ERROR
Uncaught TypeError: Cannot read property 'FDataSet' of null | TypeError: Cannot read property 'FDataSet' of null at Object.IsEnabled (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:74753:113) at Object.UpdateElementData (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:31854:18) at Object.UpdateElementData (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:40482:57) at Object.UpdateElement (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:31718:14) at Object.EndUpdate (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:33229:43) at Object.EndUpdate (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:33714:31) at Object.AfterLoadDFMValues (http://localhost:8000/WebCoreBugs/WebCoreBugs.js:13039:12) at Object.LoadDFMValues

Somehow the problem is "Full/Complete Boolean Evaluation" when form is loading controls (AfterLoadDFMValues).
DataSource = nil
DataSet = nil
Enabled = true

function TDBCheckBox.IsEnabled: boolean;
begin
Result := Enabled and CheckDataSet and DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]);
end;

By default the TWebDBCheckbox has no DataSource value at design time. But that triggers an exception when loading the form on runtime.

Partial Boolean Evaluation works most of the times for example:
var
B: Boolean;
begin
DataSource := nil;
B := True or (DataSource.DataSet.RecordCount>0);
end;
throws no exception.

Kind Regards

Delphi 10.4.2 Sydney
Web Core 1.7.1.0 (full) 4.5.2021

Problem exists in newer version also.

Kind Regards

We have the same problem, is there any solution?

We have fixed this. The next update will address this.

Hello ist possible to get the fix before? We can't continue our project. Also I think it is not possible to go back to 1.6, in that version it was working, but in this version we had a problem with the dbdatetimepicker which is ok in 1.7

Greetings Ralf

Contact us by email to request an incremental source update.

Delphi 10.4.2 Sydney
Web Core 1.7.2.0 (full)

Issue resolved.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.