From 959d13aed8de61dd851ac4a74a68456af76c57f9 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Thu, 26 Oct 2023 11:30:07 +0200 Subject: [PATCH] messaging_infrastructure.md: Use actual constant introduced in example --- topics/reference_guide/messaging_infrastructure.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/topics/reference_guide/messaging_infrastructure.md b/topics/reference_guide/messaging_infrastructure.md index b32ba05d3..c6596c3d1 100644 --- a/topics/reference_guide/messaging_infrastructure.md +++ b/topics/reference_guide/messaging_infrastructure.md @@ -87,7 +87,8 @@ public interface ChangeActionNotifier { {style="note"} ```java -project.getMessageBus().connect().subscribe(ActionTopics.CHANGE_ACTION_TOPIC, +project.getMessageBus().connect().subscribe( + ChangeActionNotifier.CHANGE_ACTION_TOPIC, new ChangeActionNotifier() { @Override public void beforeAction(Context context) { @@ -109,8 +110,8 @@ Many standard interfaces implement returning a message bus, e.g., [`Application. ```java public void doChange(Context context) { - ChangeActionNotifier publisher = - project.getMessageBus().syncPublisher(ActionTopics.CHANGE_ACTION_TOPIC); + ChangeActionNotifier publisher = project.getMessageBus() + .syncPublisher(ChangeActionNotifier.CHANGE_ACTION_TOPIC); publisher.beforeAction(context); try { // do action