I have an Android app written in Delphi Seattle.
I need to show a form modally in a function then get back the value of an Edit object.
However, this doesn't work:
Function GetMyValue: String;
if ModalResult = mrOK then
Result := MyEdit.Text;
I get a compiler message: [dcc32 Error] E2555 Cannot capture symbol 'Result'
I know that in anonymous method I cannot refer to the main functions result, but I need to get back the text when the user closes the form.
How can I do that?
Thank you very much!