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 / Administrar bases de datos / HFSQL / Funciones de enlace
  • Binding between a control and a WLanguage variable or between a control and a data file item
  • Linking to a field: types of links
  • Miscellaneous
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
Automatically initializes the controls of a window with:
  • the values of the bound items in the current record (loaded in memory) of the HFSL data file described in the data model editor. This operation is performed regardless of the state of the controls (grayed, inactive or invisible).
  • the values of the bound WLanguage variables. This operation is performed regardless of the state of the controls (grayed, inactive or invisible).


Remarks:
  • WindowFromSource does not read records on the data file. The value of the record loaded in memory is used to update the controls. Therefore, a record must be loaded in memory previously:
Ejemplo
// Searches for customer in the data file
HReadSeekFirst(CUSTOMER, NAME, "PAUL")
IF HFound() = True THEN
	// Displays the client found in the current window
	WindowFromSource(CUSTOMER)
END
// Read the record and 
// transfer items to the controls in WIN_Customer
HReadFirst(CUSTOMER, NAME)
WindowFromSource(CUSTOMER, WIN_Customer)
Sintaxis
WindowFromSource(<Source> [, <Window>])
<Source>: Character string
Source to which the items to be updated are bound. For example, this source can be:
  • The name of a data file: only fields linked to a field in this data file are taken into account.
  • The name of a WLanguage variable. In this case, only the controls bound to the WLanguage variable are taken into account.
    Remarks:
    • If the name of the variable is enclosed in quotes, the control will be bound to the specified variable.
    • If the name of the variable is not enclosed in quotes, the control will be bound to the variable data (e.g., a variable containing the name of another variable).
<Window>: Optional window name
Name of the window containing the controls to be updated.
Summary: Called when a control gains focus.
Observaciones

Binding between a control and a WLanguage variable or between a control and a data file item

The binding between a control and a WLanguage variable or between a control and a data file item can be determined:
  • In the editor, in the control description window ("Binding" tab).
  • Programmatically, with the DataBinding property.

Linking to a field: types of links

There are two types of bindings between a control and an item
  • direct binding: In this case, WindowFromSource transfers the value of the items from the record loaded in memory to the bound control, without reading any values.
  • binding by reading the records in the associated data file.

Miscellaneous

  • Auto-filled Combo Box control bound to an HFSQL data file: WindowFromSource must not be in the "Global declarations" event of the window. The function must be in the "Initialization" event of the window.
  • Space characters in HFSQL items are kept.
  • WindowFromSource updates Image controls with the value of the bound image memo items.
  • WindowFromSource supports the NULL value. If the item content is NULL, an empty string will be displayed in the bound Edit control. To change this display mode, use ControlError.
  • WindowFromSource is not available on views. The values of the items must be assigned to each control.
  • Binding with "Secure Password" items:
    • In an Edit control bound to a Password item, "*****" characters are displayed. If the Edit control is of type "Password", dots are displayed instead.
    • The value of the "Password" item cannot be read again until the user changes the password value.
    • The value of the "Password" item can still be compared to a string (e.g., "" or "1234").
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 27
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