BPopupMenu not sending out any messages

I’m having a strangely hard time adding a BPopUpMenu to my custom BTextView.
I’ve tried several approaches, checked and double-checked the docs, and looked at some sample code - I am doing everything right, still don’t get any messages from menu items invocations.

I’ve added a simple context menu to my textview that overrides the native context menu.
For the items, I create fresh messages with some custom property.
The menu shows up just fine, but nothing happens when I select an item.

I’ve experimented with the async flag, made the menu a field just to go sure, added some logging to the view’s AND window’s MessageReceived function to check where it actually lands, but nothing ever shows up.

I am a bit puzzled now.
Any idea what I’m missing?
You can check the code at:

PopUp menus don’t have a target when they are created. You’ll need to call SetTargetForItems()

1 Like

Oh no, seriously? How could I’ve overlooked that :sweat_smile::man_facepalming:
Thanks, I’ll try this out right now.

Update: sadly still not working🤔

The second argument for Go() needs to be true in order for the message to be sent.

1 Like

oh no how could I overlook that? I even read the description but somehow forgot when coding.
Thanks a bunch, works now! :sweat_smile: