Jump to content

CallBack in Prompt Dialog


Edson Marcelo

Recommended Posts

Hello Guys, I would like to know if it is possible to do this:

when calling the function TFuncoes.Prompt, even with the EnableSynchronousOperations property equal to true, the execution is passing to the last line of the function.

Sorry for my ignorance, but am I doing something wrong?

this is my function:

class function TFuncoes.Prompt (txt: string): string;
var
    return: string;
begin
    return: = '';
    uniGUIDialogs.Prompt (txt, '', mtInformation, mbOKCancel,
       procedure (Sender: TComponent; AResult: integer; AText: string)
       begin
          if AResult = mrOK then
          begin
             return: = AText;
          end;
       end);

    Result: = return;
end;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...