Shannon

Software Development for MacOS, iOS, and Web-based platforms • Software and Web Site Design

Technologies

JSTalk provides a platform for programmers to write and evaluate JavaScript code, either within the application itself or in the user’s default Web browser. The application also features a history container which holds code the user has evaluated earlier, and the user may step back and forth through this previous code. There is also a Scratchpad window which allows creation of code snippets which may be stored and inserted into the main code window and evaluated as desired. The application supports fully styled text for all code.

The application also features a “templates” feature which allows boilerplate code to be inserted in to the script field or the scratchpad with the simple choice of a menu item.

A look at the main evaluation window is provided below:

JSTalk

sales@shannontech.commailto:sales@shannontech.comshapeimage_3_link_0
Shannon Technologies - sales@shannontech.com - (541) 954-4637

Questions, suggestions, and technical support is available at the following email address:

JSTalk allows the programmer to type JavaScript code in the top field of the main window, and by clicking the “Evaluate” button have the code evaluated. The result appears in a field at the bottom of the window, as shown below.

Evaluation

Scratchpad

Templates

History

Text Formatting

Evaluation Service

Alternately, the user may wish to display the output in a separate dialog. Unchecking the “Results” control provides this functionality.

Some code cannot be run independent of a Web browser since it requires access to the document or window objects of the Domain Object Model. This code can be run by selecting the “Evaluate in Browser” item from the Panel menu. This will create a Web page on the fly and run the code from the Evaluate field in the user’s preferred browser.

JSTalk also keeps track of the code which has been evaluated in the History tab of the main window. In the window below, recent code snippets which have been evaluated along with the result of the evaluation (shown in red) are displayed. Any code in the History field may be selected and inserted in the JavaScript field using the “Insert” button (or by copy and paste or dragging) at any time. When using the main (“JavaScript”) tab the programmer may also cycle forward and backward through evaluated code using the arrow buttons shown below.

The contents of the history container may also be exported, either as a special history structure or as a text file. The special history files may be imported using the “Import History...” command. When imported the history structure becomes the current history and the user may select text, cycle back and forward through the code, etc.

JSTalk supports fully stylized text in any code field. Programmers may use the standard OS X text formatting commands to set fonts, weights, colors, and other attributes of text.

There are three other ways to created styled text in JSTalk.

First, code which is styled will retain its text characteristics when it is copied and pasted into a JSTalk field.

Second, a programmer may choose the “Mark” command from the Format menu, which causes the selected text to be displayed in a bold, red font.

Third, the programmer may choose the “JavaScript Keywords” command from the Format menu. JSTalk will search the code, identify JavaScript keywords, and render those keywords in blue text.

JSTalk also includes a simple text editor window called the Scratchpad. This allows programmers to create, edit, and save code. All editing, formatting, and template insertion (see below) capabilities are available in this window. Programmers may also select code in the Scratchpad window and immediately insert it into the JavaScript window by using the “Insert” button at the bottom of the window.

Text inserted in this way will appear in the JavaScript field at the current insertion point. However, if the Option key is held down when the “Insert” button is clicked, the selected text replaces any text previously appearing in the JavaScript field. Any command in JSTalk which inserts text into the JavaScript field will replace the previous field contents if the Option key is held down when issuing the command.

Code in the Scratchpad window is retained from application launch to launch. Code may be saved externally by selecting and dragging it to a window or the desktop to create a clippings file, and it may be imported by dragging any text from the Finder or another application into the window.

Code templates are also available in JSTalk. These templates are available via the Templates menu, shown below. When the programmer selects a template from the Templates menu, the applicable code is inserted into the JavaScript field, if the main window is active, or the text field in the Scratchpad window, if it is frontmost. The code appears at the insertion point, or replaces the current code, as is described above.

JSTalk may also be used as a resource to evaluate code found in other applications such as word processors, editors, slide creation applications, and any other program which features text. This is done using OS X’s “Services” feature.

To execute code from another application, simple select the code and choose Services>Evaluate Text as JavaScript from the application menu (the Command-Shift-J shortcut will also work). The code will immediately placed in JSTalk’s JavaScript field and evaluated.