Editable Box OnCommitText sent twice

Any idea why the following CustomEvent_0 is sent twice on pressing enter (OnCommitText)?

Thanks in advance!

1 Like

Depending on the way the widget is handled, the Construct event may fire more than once, binding things twice or more. Try binding with Event onInitialised:

See how it goes. You should be able to move the entire script there. Pre/Construct is better when you need to toy around with layout.

1 Like

Good idea, but no luck unfortunately, here’s how the new graph and how it prints in game:

image

1 Like

I wonder if the second print comes from the widget losing focus, try this:

yes that solved it, thanks a lot.

The problem is probably because I am creating and adding the same widget after pressing Enter.

1 Like

Hi there @PoumTchakStudio, hope you’re well!

This topic has been moved from Community DIscussion to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile:

1 Like