FGX.Messaging.TfgMessageSender: различия между версиями
Перейти к навигации
Перейти к поиску
Admin (обсуждение | вклад) (summary) |
Admin (обсуждение | вклад) (summary) |
||
Строка 33: | Строка 33: | ||
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">CanNotify(): [[Boolean]]</code> | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">CanNotify(): [[Boolean]]</code> | ||
Returns whether '' TMessageSender '' can send messages. | Returns whether '' TMessageSender '' can send messages. | ||
+ | |} | ||
+ | |||
+ | == Свойства == | ||
+ | |||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Receiver: [[TObject]]</code> | ||
+ | Returns the object that receives the message. | ||
|} | |} |
Версия 04:52, 10 июня 2019
Delphi
TfgMessageSender = class (TfgPersistent)
Описание
Class to allow sending message notifications to a TObject Receiver .
Методы
function
|
HasReceiver(): Boolean
Returns whether TMessageSender has a Receiver or not. |
procedure
|
SendMessage(const AMessageID: Word)
Sends a message to an object. |
procedure
|
SendMessage(const AMessageID: Word; const AValue: T)
Sends a message with value to an object. |
procedure
|
SendMessageWithResult(const AMessageID: Word; var AValue: T)
Sends a message with value to an object and allows to get result from Receiver . |
procedure
|
DisableNotify()
Disables TMessageSender from sending messages. |
procedure
|
EnableNotify()
Enables TMessageSender to send messages. Use CanNotify to check whether TMessageSender can send messages. |
function
|
CanNotify(): Boolean
Returns whether TMessageSender can send messages. |
Свойства
property
|
Receiver: TObject
Returns the object that receives the message. |