AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones varias de WINDEV
  • Disabling JITc
  • Optimizing the external calls
  • Use of the constant ForceDestructorNonDynamicObject constant to force destruction of non-dynamic objects
  • Error management
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Allows you to:
  • find out and/or modify the behavior of the application or site when some errors are generated. Depending on the selected runtime mode, these errors can be ignored or they can generate some error messages. In some cases, the ExecutionMode function can be used to restore the behavior of previous versions.
  • optimize the calls to the functions declared externally. Used to optimize the runtime speed of the application in 2 cases:
    • Procedures declared externally
    • Codes compiled dynamically, call to a global or local procedure of the project.
  • find out and/or modify how the JITc is used by the application. The application uses JITc by default. It can only be disabled.
  • find out and/or modify the management mode of low references for all the instantiated objects.
Ejemplo
// Test mode?
IF InTestMode() = True THEN
	ExecutionMode(NormalMode)
ELSE
	// Apply the operating mode of WINDEV 5.5  
	// to avoid displaying some errors
	ExecutionMode(PermissiveMode)
END
Sintaxis

Retrieving the current runtime mode Ocultar los detalles

<Result> = ExecutionMode()
<Result>: Combination of Integer constants
Current runtime mode of application or site:
DisableOptimizedAnsiUnicodeConversionStarting with version 29 Update 3, an optimized Ansi/Unicode conversion has been implemented to speed up operations that manipulate Ansi and Unicode strings. This new method also reduces potential lost characters when converting data from one charset to another.
This constant is used to restore previous operation (especially in the event of an "Internal error during optimized Ansi/Unicode conversion" type error).
DisableOptimizedExecutionJITc (Just In Time compilation) is disabled.
ExternalCallsOptimizedOptimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
WEBDEV - Código Servidor This constant is not available.
ForceDestructorNonDynamicObjectForces the destruction of non-dynamic objects (even if a strong reference was taken).
modeFormerOperatingModeDurationThe Duration properties keep the operating mode used in version 12.
NormalModeThe errors that occurred generate error messages.
PermissiveModeThe errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode).

Modifying the current runtime mode Ocultar los detalles

<Result> = ExecutionMode(<New runtime mode>)
<Result>: Integer constant
Runtime mode of application or site after modification.
DisableOptimizedAnsiUnicodeConversionStarting with version 29 Update 3, an optimized Ansi/Unicode conversion has been implemented to speed up operations that manipulate Ansi and Unicode strings. This new method also reduces potential lost characters when converting data from one charset to another.
This constant is used to restore previous operation (especially in the event of an "Internal error during optimized Ansi/Unicode conversion" type error).
DisableOptimizedExecutionJITc (Just In Time compilation) is disabled.
ExternalCallsOptimizedOptimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
WEBDEV - Código Servidor This constant is not available.
ForceDestructorNonDynamicObjectForces the destruction of non-dynamic objects (even if a strong reference was taken).
modeFormerOperatingModeDurationThe Duration properties keep the operating mode used in version 12.
NormalModeThe errors that occurred generate error messages.
PermissiveModeThe errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode).
<New runtime mode>: Integer constant
New runtime mode to apply.
DisableOptimizedAnsiUnicodeConversionStarting with version 29 Update 3, an optimized Ansi/Unicode conversion has been implemented to speed up operations that manipulate Ansi and Unicode strings. This new method also reduces potential lost characters when converting data from one charset to another.
This constant is used to restore previous operation (especially in the event of an "Internal error during optimized Ansi/Unicode conversion" type error).
DisableOptimizedExecutionDisables JITc (Just In Time compilation).
ExternalCallsOptimizedOptimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
WEBDEV - Código Servidor This constant is not available.
ForceDestructorNonDynamicObjectForces the take of low reference for all the objects.
modeFormerOperatingModeDurationThe Duration properties keep the operating mode used in version 12.
NormalModeThe errors that occurred generate error messages.
PermissiveModeThe errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode)
Observaciones
WINDEVReportes y ConsultasCódigo de Usuario (UMC)

Disabling JITc

To disable JIT technology in an application, it is recommended to use ExecutionMode with the DisableOptimizedExecution constant in the project initialization code. In this case, only the elements loaded before running the project initialization code (components, sets of procedures, classes) will use JITc.
To disable JITc for a WINDEV application (e.g. problem caused by JITc), it is recommended to modify (or create) the <Executable name>.WX file. This file must be found beside the executable of the application and it must contain the following information:
[WD_EXECUTION]
OPTIM_EXECUTION=0

Optimizing the external calls

Attention: When a project is migrated from version 5.5, permissive mode has been automatically added during migration in the project initialization code.. The following line of code allows you to take into account the optimization of external calls:
ExecutionMode(PermissiveMode + ExternalCallsOptimized)

Use of the constant ForceDestructorNonDynamicObject constant to force destruction of non-dynamic objects

Warning: When using the constantForceDestructorNonDynamicObject constant to force destruction of non-dynamic objects, the setting applies to all class instances in the application.
In the case of an existing project, the effects can be numerous and the change of mode requires a complete validation of the application.
It is advisable to intervene on release management (weak/strong reference capture) at the level of each class, rather than globally for the project.. For more details, see Advanced management of class instances.

Error management

The table below presents the behavior of the application according to the errors that occurred:
Error casePermissiveModeNormalMode
Reading an index outside the range of a Table, List Box or Combo Box control.
Examples:
s = ListA[-1]
n = ListB[56]..Color
The program returns '0' or an empty string ("") depending on the property used.A runtime error is displayed.
Example:
"Invalid index: [-1]"
Writing to a negative index of a List Box, Table or Combo Box control.
Example:
List[-1] = "Smith"
The line of code is ignoredA runtime error is displayed.
Example:
"Invalid index: [-1]"
Writing to a large index of a List Box, Table or Combo Box control.
Example:
LIST[54] = "Smith"
An empty element is inserted at the end of the List Box control and takes the specified value.A runtime error is displayed.
Example:
"Invalid index: [54]"
Using Open, OpenMobileWindow, OpenChild, OpenSister with a window name containing additional space characters.
Example:
Open("WIN1 ")
The additional space characters are deleted.A runtime error is displayed.
Example:
"The 'WIN1' window cannot be found"
Using the functions for managing popup and drop-down menus with a menu number that does not exist.
Example:
MenuMark(WIN1, 54645)
The function returns '0' and ErrorInfo is filled.A runtime error is displayed.
Example:
"The [54645] option does not exist in the menu"
Using Right and Left with a negative number of characters to extract.
Example:
Left("abcdef", -1)
The function returns an empty string ("").The function returns EOT and ErrorInfo is filled.
Using Middle with a start position that is negative and/or with a negative number of characters to extract.
Example:
Middle("abcdef", -2, -4)
The function:
  • starts the extraction from the beginning of the string if the start position is negative.
  • returns the entire source string.
The function returns EOT and ErrorInfo is filled.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local