WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
3
|
3389 Views
|
3 Replies
|
8 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Wolfram Language
User Interface
How do I create a frontend dialog which blocks the kernel evaluation?
Arnoud Buzing
Arnoud Buzing, Wolfram Research
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
Reply
|
Flag
3 Replies
Sort By:
Replies
Likes
Recent
4
Ernst H.K. Stelzer
Ernst H.K. Stelzer, Goethe-Universtät Frankfurt am Main
Posted
12 years ago
Hi, this solves your problem:
Print[1];
DialogInput[DialogNotebook[{TextCell["Click to proceed"],Button["Proceed",DialogReturn[1]]}]];
Print[2];
POSTED BY:
Ernst H.K. Stelzer
Reply
|
Flag
0
Arnoud Buzing
Arnoud Buzing, Wolfram Research
Posted
12 years ago
Thanks!
I found this also later in the documentation ... I was getting stuck on trying various things with MessageDialog.
POSTED BY:
Arnoud Buzing
Reply
|
Flag
1
Vitaliy Kaurov
Vitaliy Kaurov, WOLFRAM Research
Posted
12 years ago
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
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how »