Support for JavaScript - Dynamic CodeThe JavaScript support in Spider also includes a hint mechanism called Dynamic Code. In fact, this mechanism consists of two tools: NOTE! Dynamic code takes data from the definition file for scripts and parses existing script code. In this way, it is possible to provide names and argument lists of built-in functions and predefined and declared JavaScript variables and constants in the script. This allows you to write scripts much more efficiently - you don't have to remember the exact names of all JavaScript functions, or a long list of variables. Dynamic codeDynamic code works by suggesting the names of usable elements (functions, variables and constants). The tool can be called in two ways:
If you have activated automatic display, type the beginning of the function name and wait a moment - a list with items you can use will appear. The list will highlight the first item that most closely matches the string you entered. If automatic hints is disabled, use Ctrl+Space shortcut to get a hint. For example, if there is a function: function myfunc (a, b) { a = a + b; } Now just type (vertical line means the cursor in the document): myf|and use the shortcut Ctrl+Space (or wait a moment if you activated the dynamic code). A window will appear with the name my_function. You can navigate through the list using scroll bars, arrows, etc. (as in any window). To insert the selected structure into the document, press Enter, or click on it. The icons next to the names indicate whether it is a variable, constant, or function name Dynamic hintsDynamic hints work by prompting for function arguments as the script is being written. The tool gets the data similarly to the dynamic code - from the definition file and from the script analysis results. Thanks to that you don't have to remember or search in the code which arguments are required by the function.The tool can be invoked in two ways:
Settings and other dynamic hints options |
Related topics |