PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE


  • Reason
  • Correction
  • Example
  • Using a class with mandatory parameters in the definition of an array
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Error 1036: A class used in an array must have a constructor without parameter (or
Reason
You are using a class in an array. This class owns a constructor that expects mandatory parameters.
Correction
Two possibilities:
  • Define optional parameters in the constructor of the class.
  • Use no parameter in the constructor of the class but create an initialization method. The parameters will be passed to the method for initializing the class.
Example

Using a class with mandatory parameters in the definition of an array

Code triggering the error
Object_size is array of 5 Class1(3,4)


Possible correction
Use an initialization method.
Object_Size is array of 5 Class1
FOR i = 1 TO 5
Object_Size[i] = Class1:Initialization(3,4)
END
Minimum required version
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment