PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Reason
  • Correction
  • Example
  • Handling a non-global method in a global method
Products
WINDEVWEBDEV - Server codeWEBDEV - Browser codeWINDEV MobileReports and Queries
Platforms
WindowsLinuxWindows MobileUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple Watch
Languages
JavaPHPAjaxUser code (UMC)External language
Databases
HFSQLHFSQL Client/ServerStored proceduresOLE DBODBCNative Accesses
Error 1021: The method of the class is not global
Reason
You are trying to use a non-global method from a global method.
Reminder: The global methods can be handled from a global method only (the non-global methods cannot be handled).
Correction
Two possibilities:
  • Switch the method to global.
  • Handle a global method.
Example

Handling a non-global method in a global method

Code triggering the error
GLOBAL PROCEDURE Drawing::Destroy()
// Frees a list of drawings
pDrawing, pAux are objects Drawing dynamic
Drawing::Place()
// Free the object from the last one
pDrawing=::pLast
WHILE pDrawing<>Null
// Store the current drawing
pAux=pDrawing
// Move forward in the linking
pDrawing=pDrawing:pPrevious
// Free the current drawing
delete pAux
END
::pLast = Null
Possible correction
Define the Move method as a global method.
Minimum version required
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment