ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 26 of this documentation page. This feature may have been changed or removed in a higher version.
Help / WLanguage / WLanguage functions / Standard functions / Windows management functions / Miscellaneous WINDEV functions
  • Sharing code between a WINDEV Mobile application and a WINDEV application or a WEBDEV site
  • Running processes containing compilation errors
  • Availability of the function
  • Operating mode in GO mode and at runtime
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
InPocketMode (Function)
In french: EnModePocket
Warning
From version 16, this feature is kept for backward compatibility. It is recommended to use InWindowsMobileMode..
Indicates whether the code is run:
  • from a WINDEV Mobile application.
  • from a WINDEV application, from a WEBDEV site or from a PHP application.
Example
// Code run from the WINDEV Mobile application?
IF InPocketMode() = True THEN
// WINDEV Mobile application
// Process to perform
...
ELSE
// WINDEV application, PHP application or WEBDEV site
// Process to perform
...
END
Syntax
<Result> = InPocketMode()
<Result>: Boolean
  • True if the code is run from a WINDEV Mobile application,
  • False if the code is run from a WINDEV application, from a PHP application or from a WEBDEV site.
AndroidAndroid Widget Java This value always corresponds to False.
WEBDEV - Browser code This parameter always corresponds to False.
Remarks

Sharing code between a WINDEV Mobile application and a WINDEV application or a WEBDEV site

InPocketMode allows you to share code between a WINDEV Mobile application and a WINDEV application or a WEBDEV site.
During the compilation, the functions that cannot be used in WINDEV Mobile will be signaled in the "Code" pane. However, no runtime error will be triggered by these functions.
For example, the following code is shared between a WINDEV Mobile application and a WINDEV application.
MyParameterFile is string
// Code run from the WINDEV Mobile application?
IF InPocketMode() = True THEN
// WINDEV Mobile application
MyParameterFile = "\MyFiles\Param.INI"
ELSE
// WINDEV application
MyParameterFile = fCurrentDir() + "\Param.INI"
END
During the compilation, an error will be displayed in the "Code" pane to indicate that fCurrentDir is not allowed in Pocket PC. However, no runtime error will occur when the application is used on a Pocket PC: indeed, fCurrentDir will never be called.

Running processes containing compilation errors

By default, the security mechanism of WLanguage is triggered only if the line containing the compilation error is run.
For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered only if the line containing this function is run.

Availability of the function

InPocketMode is available for all the products to allow for a multi-product code. Functions or procedures that use InPocketMode can be shared between several products without generating any compilation error.
Windows Mobile

Operating mode in GO mode and at runtime

In GO mode (simulation on the development computer), InPocketMode always returns True.
InPocketMode returns False only when it is called from a standard WINDEV application.
Business / UI classification: Neutral code
Component: wd260vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/01/2021

Send a report | Local help