ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
LoadProcedure (Function)
In french: ChargeProcédure
Warning
LoadProcedure is kept for backward compatibility.
To share procedures between several applications, it is recommended to:
  • create a set of procedures
  • create the procedures to share in a set of procedures
  • associate the set of procedures with the different projects that must share these procedures.
The documentation about LoadProcedure is as follows.
 
Purpose
Using the local procedures of a window as procedures global to the project.
Syntax
<Result> = LoadProcedure(<WindowName>, <Message>)
  • <Result> is a boolean indicating whether the procedures have been loaded
  • <WindowName> is a character string containing the name or the alias of the window in which the internal procedures have been described.
  • <Message> is a boolean used to specify whether an error message must be displayed (True by default) or not (False) at runtime, if the procedures are not loaded.
Details
The internal procedures of <WindowName> window become procedures global to the project
<Result> is set to True if the load operation was successfully performed. If <Message>=True, a message appears if the window was not found at runtime.
If there is no current project, an error message signals it.
Notes
  • LoadProcedure can be used to load the procedures of 16 windows at the same time.
  • For information: when a procedure is run in WLanguage, it is searched:
    • in the internal procedures of the window,
    • then in the different "modules" loaded,
    • finally in the global procedures.
  • The procedures loaded by LoadProcedure are automatically unloaded when closing the project. They can be unloaded by UnloadProcedure.
  • LoadProcedure does not load:
    • the global variables and the opening code of the window.
    • the code of window controls.
  • The initialization code of the window is not run. Therefore, no global variable can be added when loading the procedure.
  • A window procedure called by LoadProcedure cannot be called by Timer.
  • Caution: if a window procedure called by LoadProcedure is named like an internal procedure of the current window or if it is named like a global procedure, this procedure will not be loaded. We advise you not to load procedures named like procedures that already exist in the window or in the project. The procedure to load can be renamed.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/15/2024

Send a report | Local help