RefObject (TdbfMessage)
De Wiki1000
(Différences entre les versions)
Ligne 11 : | Ligne 11 : | ||
begin | begin | ||
msg := box.CreateMessage('Some subject in a queue','Some content', nil); | msg := box.CreateMessage('Some subject in a queue','Some content', nil); | ||
− | msg.refObject | + | msg.refObject := self; |
msg.queueTopic := 'topic1'; | msg.queueTopic := 'topic1'; | ||
// | // |
Version actuelle en date du 12 juillet 2011 à 17:10
property RefObject:TRefObject;
Propriété en lecture / écriture.
Cette propriété contient une référence vers un objet, elle peut être utilisé pour rattacher le message à un objet métier de l'application.
Exemple :
begin withP transaction do begin msg := box.CreateMessage('Some subject in a queue','Some content', nil); msg.refObject := self; msg.queueTopic := 'topic1'; // box1 := TdbfMessageBox.FindBox('box1'); if Assigned(box1) then box1.AttachMessage(msg); end; end;
Whos here now: Members 0 Guests 0 Bots & Crawlers 1 |