Copyright © 2024 IMIBO. Privacy Statement
Extended MAPI in DELPHI
LazyMAPI
Included Helper Classes & Objects
TMAPITableAdvise
IMAPIAdviseSink Table wrapper object.
unit: MAPITable.pas
file path: ..\Library\Helpers
version: 2018.хх
uses Windows, Contnrs, ExtendedMAPI;
Unit: | MAPITable.pas |
Type: | Class |
Inherited from: | TMAPIBase |
Declaration:
TMAPITableAdvise = class(TMAPIBase) private ... protected ... public constructor Create; destructor Destroy; override; property Active: Boolean read GetActive write SetActive; property AdvisedTable: IMAPITable read GetMAPITable; procedure Advise(const MAPITable: IMAPITable); procedure UnAdvise; property ConnectionID: ULONG_PTR read FConnectionID; property OnChanged: TTableBasicEvent read FOnChanged write FOnChanged; property OnError: TTableErrorEvent read FOnError write FOnError; property OnReload: TTableBasicEvent read FOnReload write FOnReload; property OnRestrictDone: TTableBasicEvent read FOnRestrictDone write FOnRestrictDone; property OnSetColDone: TTableBasicEvent read FOnSetColDone write FOnSetColDone; property OnSortDone: TTableBasicEvent read FOnSortDone write FOnSortDone; property OnRowAdd: TTableRowAddOrModifiedEvent read FOnRowAdd write FOnRowAdd; property OnRowModified: TTableRowAddOrModifiedEvent read FOnRowModified write FOnRowModified; property OnRowDeleted: TTableRowDeletedEvent read FOnRowDeleted write FOnRowDeleted; end;
Constructors
Name | Description |
---|---|
constructor Create(const oTable: IMAPITable); virtual; | Creates and initializes object instance from IMAPITable |
Properties
Name | Access | Type | Description |
---|---|---|---|
Active | RW | Boolean | Start/Stop the notification callbacks |
AdvisedTable | RO | IMAPITable | Pointer to advised table |
ConnectionID | RO | ULONG_PTR | A nonzero value that represents the successful notification registration |
Methods
Name | Description |
---|---|
Advise | Registers an advise sink object to receive notification of specified events affecting the table procedure Advise(const MAPITable: IMAPITable); |
UnAdvise | Cancels the sending of notifications previously set up with a call to the Advise method. procedure UnAdvise; |
Events
Name | Type | Description |
---|---|---|
OnChanged | TTableBasicEvent | Indicates at a high level that something about the table has changed. |
OnError | TTableErrorEvent | An error has occurred, usually during the processing of an asynchronous operation. Errors during the processing of the following methods can generate this event: FastSort, Sort, Set ColumnsTags, FastFilter, Filter |
OnReload | TTableBasicEvent | The data in the table should be reloaded. |
OnRestrictDone | TTableBasicEvent | A restriction operation initiated with an FastFilter/Filter method call has completed. |
OnSetColDone | TTableBasicEvent | A column setting operation initiated with an Set ColumnsTags method call has completed. |
OnSortDone | TTableBasicEvent | A table sorting operation initiated with an FastSort/Sort method call has completed. |
OnRowAdd | TTableRowAddOrModifiedEvent | A new row has been added to the table. |
OnRowModified | TTableRowAddOrModifiedEvent | A row has been changed. The row member contains the affected properties for the row. |
OnRowDeleted | TTableRowDeletedEvent | A row has been removed from the table. The propPrior member is set to nil. |
Usage:
Please see Lazy MAPI # 7 – Test TMAPITable wrapper, FastFilter and FastSort (with Events)