JVCL Help:TJvMTThreadToVCL.OnCanRead

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Occurs when at least one object can be read from the buffer.


Pascal

 propertyOnCanRead: TNotifyEvent;


Description

Called in the context of the main VCL thread. At least one object can be read from the buffer during this event. For each object in the buffer this event will fire exactly once.
The following example reads an TMsg object from the buffer and frees it after processing. type

 TMsg = class

Msg: string;
end;

procedure TForm1.JvMTThreadToVCL1CanRead(Sender: TObject);
var

 M: TMsg;
begin
M := TMsg(JvMTThreadToVCL1.Read);
try
// Process message M

ShowMessage(M.Msg);

 finally
M.Free;
end;
end;


See Also

TJvMTThreadToVCL.Read, TJvMTThreadToVCL.Write


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page