PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Reason
  • Correction
  • Examples
  • Code for class declaration used in the code of a button
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 1045: A class cannot be declared outside the declaration code of a class
Reason
The current code corresponds to a class declaration. This code is found in a process other than the declaration process of the class.
Correction
Check whether the class was created in your project and copy the declaration code of the class into the "Class declaration" process.
Examples

Code for class declaration used in the code of a button

Code triggering the error
// -- Click on BTN_Button1
AFile is Class
Name is string
Extension is string
Directory is string
END
Possible correction
Creating the AFile class and copying the code for declaring the AFile class into the declaration code of the class.
// -- Declaration of AFile class
AFile is Class
Name is string
Extension is string
Directory is string
END
Minimum required version
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment