Create Function That Takes Events/functions as parameters

Hi!

Im trying to create a function in a “User Interaction Component”.

The function we call: “PromptForConfirmationOrCancel”

Now I call the prompt with 2 functions as parameter. Those 2 functions I want to bind to confirm or cancel events.

Are there special technical problems for this? Its pretty low lvl stuff to work with function pointers and many languages suport this type of delegation trickery. It would be a great pattern to use since I can unbind the functions after executing them and the whole dialog logic would be in the dialog function… all im doing in my class requiring it is calling for the prompt and assigning 2 functions…

Here a sketch of what I mean:

This would be so incredibly useful and basis to support some good design patterns. Function pointers/eventhandlers are considered a common basic thing in many languages and work like I described above.

Hope you can help me, maybe i did miss something, but it seems not doable in BP currently

I’ve had the same problem, why can’t delegates be passed as variables