|
|
|
|
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|