Click or drag to resize

DataListView.Notify Method

X#
Provide an event handler that reflects events that have occurred in the server connected to this data list view.

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Notify(
	kNotification,
	uDescription
) AS USUAL CLIPPER
Request Example View Source

Parameters

kNotification (Optional)
Type: Usual
Identifies the event, specified as one of the constants in the table below.
uDescription (Optional)
Type: Usual
Used only with some notification types. See descriptions in the table below

Return Value

Type: Usual
NIL, except if NOTIFYINTENTTOMOVE is specified for kNotification. In this case, the return value is TRUE if successful; otherwise, FALSE.
Remarks
ConstantDescription
NOTIFYAPPEND A blank record has been appended to the server; the server is still positioned on this new record, and its values have not been finalized.
NOTIFYCLEARRELATIONNot sent to a data browser.
NOTIFYCLOSEThe server intends to close itself.
NOTIFYCOMPLETION The server has completed some large operation that did not involve repositioning of the server or change to the data (such as reindexing). This gives clients a chance to update visual indication to the user that some operation has been completed.
NOTIFYDELETEThe current record has been deleted, and the server is now positioned according to its rules for how a deletion is handled. The browser should refresh its display accordingly.
NOTIFYFIELDCHANGE A field has changed. uDescription is the field name as a symbol. Note that the browser might not contain a column with the indicated name. The server knows only that it has a field of that name and that it changed, and it notifies all its clients in case they are interested.
NOTIFYFILECHANGE The server has executed some method that perform many changes to the data; all the browser's knowledge about the server and its data is potentially obsolete, and it should refresh all information from the server and all calculations that depend on the data or its position.
NOTIFYGOBOTTOM The server has moved to its last record. Many clients treat this merely as a record change, but the data browser can treat a positioning-to-the-end as a special case.
NOTIFYGOTOP The server has moved to its first record. Many clients treat this merely as a record change, but the data browser can treat a positioning-to-the-top as a special case.
NOTIFYINTENTTOMOVE The server intends to make a move. (Note that the move may have been initiated by another client.) The browser should make sure that all its data is saved, if necessary, before the movement is done. The standard implementation checks validation status. If the browser contains data that is invalid, the user has a choice of correcting the errors or discarding the data.
NOTIFYRECORDCHANGE The record position of the server has changed. All clients are notified after any movement, so they can refresh their displays from the server. A browser needs to update its display intelligently, depending on how far the move was. uDescription might indicate the length of the move (the number of records). The browser can use this information for display optimization, but cannot rely on its availability.
NOTIFYRELATIONCHANGE Not sent to a data browser (relation changes among servers are transmitted to clients as file changes).
This Notify() method is at the heart of the automatic notification among linked browsers and servers, allowing any window to make a change to a field value or initiate a movement and also ensuring that all client windows reflect the change.
Any class that is registered as a client of a server must respond intelligently to the Notify message.
As always with defined constants, you should never rely on the actual values of the constants—they will not necessarily stay the same. However, the constants do maintain their order:
  • NOTIFYFIELDCHANGE - Lowest
  • NOTIFYCLOSE - .
  • NOTIFYCOMPLETION - .
  • NOTIFYINTENTTOMOVE - .
  • NOTIFYRECORDCHANGE - .
  • NOTIFYGOBOTTOM - .
  • NOTIFYGOTOP - .
  • NOTIFYDELETE - .
  • NOTIFYAPPEND - .
  • NOTIFYFILECHANGE - .
  • NOTIFYRELATIONCHANGE - .
  • NOTIFYCLEARRELATION - Highest
Thus, you can reliably write:
X#
1IF  kNotification > NOTIFYINTENTTOMOVE;
2.AND. kNotification < NOTIFYFILECHANGE
3... // Only record level moves
4ENDIF
See Also