ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Errors / WLanguage errors
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Error 1036: A class used in an array must have a constructor without parameter
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
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help