ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Errors / WLanguage errors
  • Reason
  • Correction
  • Example
  • Handling a non-global member in a global method
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 1012: The class member is not global: it cannot be accessed from a global method
Reason
You are trying to access a non-global class member from a global method.
Reminder: The global members can be handled from a global method only (the non-global members cannot be handled).
Correction
Two possibilities:
  • Transform the member into global member
  • Handle a global member
Example

Handling a non-global member in a global method

Code triggering the error
GLOBAL procedure Drawing::Destroy()
// Frees a list of drawings
pDrawing, pAux are objects Drawing dynamic
// 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 pLast member as being a global member.
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help