Jump to content

MessageDlg


jmdoneva
 Share

Recommended Posts

In your implementation of the MessageDlg in the format MessageDlg('string',dialogtype,mbyesno,callback). It moves to the next line of code after presenting the Message dialog without waiting for a response. For example...

 

procedure test;

begin

Messagedlg('Would you like to continue?',mtConfirmation,mbyesno,DCallback1);

Close;

end;

 

procedure DCallback1(Sender: TComponent; res :Integer);

begin

case res of

mrYes : do something;

mrNo : do something else;

end;

end;

 

when the procedure test presents the Message dialog it doesn't wait for the response but Closes the form because it has move to the next line of code. Is this the way it is supposed to work or is there another way to call MessageDlg so it waits for a response.

Link to comment
Share on other sites

When I MainModule -> EnableSynchronousOperations to True it destabilizes the webpage. Data doesn't load into the unidbgrid properly and the unibuttons stop executing code when pressed. Then after a minute or two the page will crash.

 

Windows Server (Windows Server 2008 R2 Standard). I set up my site as recommended in you documentation for IIS 7.

Link to comment
Share on other sites

  • Administrators

When I MainModule -> EnableSynchronousOperations to True it destabilizes the webpage. Data doesn't load into the unidbgrid properly and the unibuttons stop executing code when pressed. Then after a minute or two the page will crash.

 

Windows Server (Windows Server 2008 R2 Standard). I set up my site as recommended in you documentation for IIS 7.

 

Can you test in standalone mode too and see if anything changes?

Link to comment
Share on other sites

My original problem was that MessageDlg didn't stop code execution. I have only developed for desktop and know little about web development. I understand now that on the web server code execution does not stop. I can work around that. The true modal dialog isn't important for me at this point.

Link to comment
Share on other sites

  • Administrators

My original problem was that MessageDlg didn't stop code execution. I have only developed for desktop and know little about web development. I understand now that on the web server code execution does not stop. I can work around that. The true modal dialog isn't important for me at this point.

 

Yes, we can emulate true modal windows in uniGUI, but it is recommended to use callbacks wherever applicable.

 

Thanks

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.

 Share

×
×
  • Create New...