Jump to content

Recommended Posts

Posted

HI

 

Is it possible TUniForm.prompt to be with modal behavior.

 

It should be possible TUniForm.ShowMessage is modal.

 

Unfortunately there is no provide source for uniGUIForm.pas and I can't fix it manually.

 

I did try to find solution in this way. But it does not work and block session thread until TimeOut(10sec) is gone

 

----------------------------------------------------------------------------------------------------------------- 

Function InputQueryWEB(Form: TUniBaseForm; Const Msg: String; Var Value: String): Boolean;

Var Res: Boolean;

Val: String;

TimeOutDT: TDateTime;

Begin

 

Res := False;

Val := Value;

TimeOutDT := IncSecond(Now, 10);

Form.Prompt(Msg, Value, mtConfirmation, mbOKCancel,

procedure(Sender: TComponent; AResult: Integer; AText: string)

begin

Res := AResult = mrOK;

if Res then Val := AText;

TimeOutDT := Now;

End, False);

 

while TimeOutDT >= Now do Sleep(100);

if Res then Value := Val;

End; 

---------------------------------------------------------------------------------------------------------------- 

 

 

Thanks

Kamen

Posted

Hi,

 

Sorry, what do you want?

 

I think you need to change the logic of the program, you need to handle it in a callback function, or enable Synchronous Operation

Posted

I'm using that function

 

Prompt procedure is method of Form - right ?

 

It seems than internally is sources (UniGUIForm.pas)

The form/dialog with edit that user will enter something is activated/shown

with call like this PrompFormObj.Show (SHOW)

 

Could it be with PrompFormObj.ShowModal ?

 

Why Form.ShowMessage is MODAL but Form.prompt is NOT ?

 

 

Thanks

Kamen

Posted

HI greats

 

I did some simple solution for this my issue.

 

Could you see it ?

 

For now it works with String only but easy latter I will extend it to all simple (ordinary) data types

 

Anyway Thanks for your time

srcPromptWEB.zip

  • Administrators
Posted

I'm using that function

 

Prompt procedure is method of Form - right ?

 

It seems than internally is sources (UniGUIForm.pas)

The form/dialog with edit that user will enter something is activated/shown

with call like this PrompFormObj.Show (SHOW)

 

Could it be with PrompFormObj.ShowModal ?

 

Why Form.ShowMessage is MODAL but Form.prompt is NOT ?

 

 

Thanks

Kamen

 

Prompt displays a Modal window.

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...