1 Reply Latest reply on Oct 8, 2008 4:59 AM by wvxvw

    Flex ScriptTimeLimit

      Here is my issue

      I am getting the following error when running a flex app ....

      Error #1502: A script has executed for longer than the default timeout period of 15 seconds.

      I read numerous blogs about how to increase script timeout limit in flex ... using

      1) <mx:application scriptTimeLimit="60">,

      2) add flex builder compiler option -default-script-limit 1000 60 ....

      but none of these work ... limit is still stuck on 15 secs .... how can I really increase the script timeout limit ???

        • 1. Flex ScriptTimeLimit
          First thing you can do (and it will be more friendly to other developers that may be working with you on the same project) is to try and catch for ScriptTimeoutError and handle this exception as you see fit. Thus you won't have to modify your compiler settings.

          Notice, that this example will make your testing environment suffer =) (and your users are likely to suffer too, because while "infiniteFunc" is executing it'll hang your system). So, may be consider splitting / optimizing your function instead of pushing execution time limits?

          BTW, the compiler argument is: -default-script-limits (notice the last "s").