2
$\begingroup$

I have those few lines of code causing a crash and I can't figure out why:

DynamicModule[{openNothing}, EventHandler[ Panel@Row@{ Button["Built In Funct", openNothing[]]}, {}], Initialization :> (openNothing[] := (Input["bla", 1];))] 

Mathematica freezes for a few seconds and then says:

The kernel is not responding to a Dynamic Evaluation. [...]

WARNING: It did make Mathematica not responding at all. After the force quit the list of the recently opened notebooks were removed (I assume that the ~/.Mathematica/FrontEnd/init.m has been removed.)

I'm on Fedora 19, Mathematica 8.0.4. The same issue has been noticed under Windows 7, Mathematica 9.

$\endgroup$
0

1 Answer 1

3
$\begingroup$

Try this

DynamicModule[{openNothing}, Dynamic@Panel@ Row@{Button["Built In Funct", openNothing[], Method -> "Queued"]}, Initialization :> (openNothing[] := (Input["bla", 1];))] 
$\endgroup$
1
  • 1
    $\begingroup$ Read the docs on the "Queued" Method. Also you dont realky need EventHandler. $\endgroup$ Commented Oct 2, 2013 at 18:18

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.