ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Errors / WLanguage errors
  • Reason
  • Correction
  • Examples
  • Using a class with mandatory parameters in the structure definition
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 1035: A class used in a structure must have a constructor without parameter...
Reason
You are using a class in a structure. 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.
Examples

Using a class with mandatory parameters in the structure definition

Code triggering the error
ObjectSize is Structure
Height is int
Width is int
Object_Position is Class1(3,4)
END
Possible correction
Use an initialization method.
ObjectSize is Structure
Height is int
Width is int
Object_Position is Class1()
END
 
ObjectSize1 is ObjectSize
ObjectSize1.Position_object:Class1:Initialization(3,4)
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help