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 / Controles, páginas y ventanas / Funciones de ventanas que pueden ser manipuladas por el usuario final
  • Use example
  • Error
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
Declares how to cancel an action that was added by WinEdDo. This function is linked to the "Allow end users to modify the UI" feature.
This function is mainly used when creating an editor through programming (see "Remarks").
Ejemplo
WinEdDo(WIN_MyEditor, ProcCreateCap, "New")
INTERNAL PROCEDURE ProcCreateCap(sCap)
	pNew is Control
	pNew <- ControlCreate("STC_" + GetIdentifier(), typText, 150, 150, 80, 20)
	pNew.Caption = sCap 
	WinEdDeclareUndo(ProcCancel)
	INTERNAL PROCEDURE ProcCancel()
		ControlDelete(pNew)
	END
END
WinEdDeclareUndo(UndoOperation, CUSTOMER.CustomerID)
// Management of Undo
INTERNAL PROCEDURE UndoOperation(nCustomerID)
	IF HReadSeekFirst(CUSTOMER, CustomerID, nCustomerID) THEN
		SourceToScreen()
	END
END
Sintaxis
WinEdDeclareUndo(<WLanguage procedure> [, <Parameter 1> [... [, <Parameter N>]]])
<WLanguage procedure>: Procedure name
Name of WLanguage procedure to run. The code of this procedure must allow to cancel the action created by WinEdDo.
Using an internal procedure provides a direct access to the local variables.
<Parameter 1>: Any optional type
First optional parameter that will be passed to the procedure.
In most cases, these parameter are values used to restore the previous status.
<Parameter N>: Any optional type
Nth optional parameter that will be passed to the procedure.
In most cases, these parameter are values used to restore the previous status.
Observaciones

Use example

WinEdDo is used to create custom actions (control creation for example) that support the undo/redo feature.
Let's take a simple example: creating a graphical object editor.
A button is used to create a shape. The user must have the ability to undo the shape creation. The following operations are performed:
  • The window switches to edit mode (WinEdActive).
  • Call function WinEdDo. The procedure called by this function is used to create the shape. This procedure also contains the call to WinEdDeclareUndo. WinEdDeclareUndo is used to define the behavior in case of cancellation by the user.
  • The window switches to standard mode (WinEdActive).
The end user can then cancel this action (Ctrl + Z or function WinEdUndo): the <Procédure WLangage> procedure will then be called up..

Error

A WLanguage error occurs if WinEdDeclareUndo is called outside a procedure added by WinEdDo.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 21
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

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