PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Deletes a variable added by DeclareAWPContext from the AWP context.
Remark: Operates only when contexts are managed on disk (ConfigureAWPContext).
Example
GLOBAL
gsMyGlobal is string
 
IF DeclareAWPContext(gsMyGlobal) = False THEN
// Initialize with the default value
gsMyGlobal = InitialValue()
END
...
 
// Deletes the value if an error occurs
IF bError = True THEN
CancelAWPContext(gsMyGlobal)
END
Syntax
CancelAWPContext([<Name of variable 1> [... [, <Name of variable N>]]])
<Name of variable 1>: Type of variable (optional parameter)
Name of the first variable that must be deleted from the context.
<Name of variable N>: Type of variable (optional parameter)
Name of the Nth variable that must be deleted from the context.
Remarks
  • No error occurs if the variable does not exist.
  • If no variable is specified, the entire session is canceled: all the stored variables are lost and the session file is destroyed. To handle a session again, you must use ConfigureAWPContext.
  • If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initializing the project after connection to the site" event.
Component: wd270page.dll
Minimum version required
  • Version 12
Comments
Exemplo Looper manual no awp
https://windevdesenvolvimento.blogspot.com/2021/06/dicas-3355-windev-webdev-mobile-fazer.html
https://youtu.be/e8yvn_5syGQ
//Exemplo Looper manual no awp
// no projeto global // Initializing awp_Exemplo
ConfigureAWPContext(ctxDisk)
//na pagina looper co awp , no codigo da procedure pagina
garrMeu_looper_array is array of string
DeclareAWPContext(garrMeu_looper_array)
// initializing of btn looper (server)
LOOP_exemplo.DeleteAll()
FOR EACH sLinha OF garrMeu_looper_array
LOOP_exemplo.AddLine(sLinha)
END
// no click do btn looper server - ajax ativado
texto is string="Texto: "+TimeSys()
LOOP_exemplo.AddLine(texto)
ArrayAdd(garrMeu_looper_array,texto)
// botao fechar
CancelAWPContext(garrMeu_looper_array)
PageDisplay(PAGE_looper_com_sessao)

amarildo
15 Jun. 2021