Message Boards Message Boards

3
|
3583 Views
|
3 Replies
|
8 Total Likes
View groups...
Share
Share this post:

How do I create a frontend dialog which blocks the kernel evaluation?

Posted 12 years ago
I am essentially trying to prevent '2' from being printed, before I click the OK button:

Print[1];MessageDialog["hi"];Print[2];

Is there a simple way to achieve this?
POSTED BY: Arnoud Buzing
3 Replies
Thanks!

I found this also later in the documentation ... I was getting stuck on trying various things with MessageDialog.
POSTED BY: Arnoud Buzing
Hi, this solves your problem:
Print[1];
DialogInput[DialogNotebook[{TextCell["Click to proceed"],Button["Proceed",DialogReturn[1]]}]];
Print[2];
Will go around with GoTo work for your case? If you type stop , then 2 will not be printed.

Module[{},
  Print[1];
  If[InputString[]=="stop",Goto[end]];
  Print[2];
  Label[end];]
POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract