Sending text box value via bluetooth

Hi everyone, I am trying to send the value of a textbox other bluetooth to an Arduino. I have done it before with a button, but not with a text box and what I have seems not to work. The code I had was based on the lostFocus for the textbox but am unsure if this is a good way to do it. Any help with this would be great, my code is shown below. Thanks in advance.


P.S its the bottom right code block that isnt working everything else is good, just there for extra info