AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Errores / Errores WLanguage
  • 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
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/05/2022

Señalar un error o enviar una sugerencia | Ayuda local