Proper way to bind this delegate? AddDynamic isn't working

Hi again,

Bit of a noob situation but I’m having trouble binding a delegate.

300612-annotation-2020-04-26-223255.png

template <typename ItemType>
class ITypedUMGListView
{
public:
	using NullableItemType = typename SListView<ItemType>::NullableItemType;

	//////////////////////////////////////////////////////////////////////////
	// Automatically implemented via IMPLEMENT_TYPED_UMG_LIST()
	//////////////////////////////////////////////////////////////////////////
	DECLARE_MULTICAST_DELEGATE_OneParam(FSimpleListItemEvent, ItemType);
	virtual FSimpleListItemEvent& OnItemClicked() const = 0;

I usually use AddDynamic but it fails.

Thanks for any help.

You could use AddRaw for non-UObject-classes or you would have to use a delegate-variable for UObject-classes, which would be:

FOnXYZDelegate MyDelegateMember = FOnXYZDelegate::CreateUObject(this, &MyClass::MyDelegateFunc)

If you search for DECLARE_MULTICAST_DELEGATE_OneParam in the unreal sources, you can find a lot of other examples.