PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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)
Minimum required version
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment