Dynamic Timeout
- To: mathgroup at smc.vnet.net
- Subject: [mg83480] Dynamic Timeout
- From: thomas <thomas.muench at gmail.com>
- Date: Wed, 21 Nov 2007 02:56:41 -0500 (EST)
Hello Mathgroup, I have created my own custom Toolbar (DockedCell) with some shortcuts and buttons that I frequently use. One of the items in the toolbar is an ActionMenu which contains calls to some of my own functions. In one of these functions, SystemDialogInput[] is called, with which I can select a subdirectory on my hard drive. ActionMenu is implemented as a Dynamic[] object in Mathematica; therefore, whatever action is triggered by choosing one of the entries, is subject to the Timeout "feature" of Dynamic[] evaluations. That means that if I am not fast enough when picking my directory, nothing will happen, since the call has timed out. Setting the option SynchronousUpdating->False does not help. What does help is to increase the Timeout-time by setting SetOptions[$FrontEnd,DynamicEvaluationTimeout->10000] or some other high number. My problem is: I do not usually want the timeout to be that large, the normal setting of 5 or 6 seconds is quite reasonable. What I can do, then, is to automatically re-set DynamicEvaluationTimeout to 6 at the end of the function - that works. What does NOT work, however, is to set it to 10000 at the beginning of the function. (Actually, it does work, but it does not take effect yet for the currently evaluating Dynamic[] within which it was set to 10000.) So, the question is: how do I avoid the timeout in this case, without generally increasing the timeout time? thomas p.s. A very easy work-around is to call my function with the help of a button, instead of using an action menu. This avoids "Dynamic" and the problem doesn't even show up. Nevertheless, I think it should be possible to do such things from within an action menu (or from within other dynamic constructs)
- Follow-Ups:
- Re: Dynamic Timeout
- From: "Thomas Muench" <thomas.muench@gmail.com>
- Re: Dynamic Timeout