Icon View Incident Report

Minor Minor
Reported By: Anders Westberg [Diginet AB]
Reported On: 2/27/2014
For: Version 1.03 Build 4
# 4013 Defining Variables in Undefined Scope of Class Causes Invalid Emitted Javascript Code

The compiler allows but generates invalid javascript class initialization code ("$t. = null") for class reference members with undefined scope such as r below.

Generated code:

function unit1_ttestclass()
var $t = this;
$t. = null;

Web browsers may simply show a blank page without any error indication.

   TTestClass = class
      r: TForm1;
      procedure Proc;

Comments Comments and Workarounds
The workaround is to move the code into an actual declared scope, such as the public scope. In general, the compiler emits special code for variables in the undefined scope of a class for form usage, so you should avoid placing variables there for non-form classes.

Resolution Resolution
Fixed Problem on 3/10/2014 in version 1.03 build 5

Products Affected Products Affected
Elevate Web Builder
Elevate Web Builder Trial