Good catch; glad you were able to figure it out.
I looked at the code you posted, and I don’t think the listing includes the culprit line. In this case, you seem to be creating a delegate that does a SharedThis(this)
in a class that does not support doing SharedThis(this)
because it does not inherit from TSharedFromThis<>
.
We almost always put handlers for UI delegates inside of widget classes. The most common pattern is to use an SCompoundWidget
as a host for most of your logic and child widgets. All widgets provide TSharedFromThis<>
out of the box, so you should be safe if you follow that pattern. We also usually begin all out native widget classes with the letter S
to help drive home the point about them being Slate Widgets.