GAB Code Editor v4 Internal Features

From GAB Help
Jump to: navigation, search

< Back to main GAB Code Editor v4 Page

Getting Started and Setup

To use the released version of the Code Editor, just link the GABCE4.exe in Plugins to a custom menu item.

For GSS Employees, you have access to two unreleased builds:

  1. Bleeding Edge - This branch is updated frequently, and likely contains major bugs, crashes, etc.
  2. Stable - A less frequently updated branch that is only updated when I am reasonably sure that nothing is completely broken.

GSS Employees are advised to use the Stable branch of projects, though, as it helps us test new features and bug fixes internally before release. To use unreleased builds:

  1. Open a 2019.1+ GSS Menu instance.
  2. Add a custom menu item of type "External Program", and link to "\\gss2k19rnd\Dev\Development Builds\Deployment Tool\OCTSRS_CE4_Deployer.exe" or "\\gss\files\Service\Joe\Deployment\GABCE4 OCTSRS Deploy Tool\OCTSRS_CE4_Deployer.exe" if the first location is not available.
  3. Open the Deploy Tool, and select the items you wish to install, and click deploy.
  4. Add a custom menu item of type "External Program", and link to Global\Plugins\GABCE4.exe
  5. Click on the custom menu item to launch.

Deploy Tool

An overview of the GssLibrary Deploy tool

The GssLibrary Deploy tool is an INTERNAL tool used to install specific versions of GssLibrary, OCTSRS, and the GAB Code Editor to clinic environments.

Do not distribute this tool to any customer.


Click the "Include in Deploy" button to check or uncheck each item you wish to deploy or skip.

  • Checking GssLibrary will deploy all GssLibrary files to your environment, but no OCTSRS or GAB Code Editor files.
  • Checking OCTSRS will deploy OCTSRS, and all of its necessary DLLs, including the GssLibrary files used.
  • Checking GAB Code Editor 4.0 will deploy GABCE4.exe, plus all of its DLLs, including most of GssLibrary.


  • Use Released - This will deploy the files that have been released to customers.
  • Use Stable/Use Daily - These are stable builds that have not yet been released, but will likely be released soon.
  • Use Bleeding Edge - These are experimental builds. They have the latest features, and also the latest bugs.
  • Last Custom Source - If you have a custom build location for any of these, use the "Pick Custom Source" link to point to it. Last Custom Source allows you to switch back to this version easily.

Deployment Options

Each item has an option for "Deploy to Environment" and "Deploy to Temp".

  • Deploy to Environment - The files for this item are copied to the appropriate folders in your GSS Menu Environment.
  • Deploy to Temp - The files are copied to your environment's temp folder. Programs that run from temp will use these files.

Errors and Warnings

After deploy, you may see a list of warnings. Usually, this is not a big deal. If things are working as expected, you can ignore these. If things are not working, copy the text here, and let Joe know.

Project Wizard

A new project wizard is added to make Global Shop style application development easier. To launch the new project wizard, click the "New Project" button to open the New Project menu, and select either the quick or full wizard.

This menu only appears when at Global Shop, and is not available to customers.

The new project menu.

Full Wizard

The full Project Wizard is a step by step wizard that lets you set up your form with a preview to help guide you.

At each step, parts that are blurred are not affected by that step. Parts that are darkened are excluded by your settings.

The new project wizard on step 2.
  1. Content Area Layout - Choose if your content area is split or not. If it's split, than navigation pages (later) cannot be split. If this is not split, each page can dictate its own settings.
  2. Form Navigation Style
    • Paged Navigation Main/Top - The entire content area (no split in 1), or the top split has 1 or more navigation pages. Set the number of pages in the box.
    • Paged Navigation Bottom - If you selected "Split" in step 1, the bottom section has 1 or more navigation pages. Set the number of pages in the box.
    • No Navigation - There are no navigation pages on this project.
  3. Form Base Style - Here, you choose if your project uses one or more of the standard Accordion Groups on the left or right dock.
    • View Modes - This has the standard View Modes that are applied to your grid(s). Include this if your project should be able to switch between one or more standard Grid layouts.
    • Functions - This replaces the mess of form buttons at the bottom of old forms.
    • Scripts - This section is for buttons that launch a GAB hook, most commonly the Script 1, 2, 3 buttons.
  4. Static Page Setting (Optional) - This step only occurs sometimes, depending on previous settings. If you have a static part of the content (no navigation), you can set up that page now.
    • Grid Style - Applies the default Grid Style to this part of the script. Optionally includes a View Options group above the grid.
    • Control Style - Applies the default Control Style to this part of the script. This is most often the top section.
    • Has Caption - Does this section contain a caption at the top?
  5. Navigation Page Settings (Optional) - This step only occurs sometimes, depending on previous settings. If you have navigation enabled, it will appear for each page.
    • You can select one of the styles described in the previous step, or have this section blank for custom controls.
    • Set your caption and (optional) icon. This will appear under the Navigation header in the left dock.
  6. Program Settings - The last page is your program settings.
    • Set your title (form caption, and top of About overlay), Description (About overlay), build date and version (About overlay).
    • If our program should use a splash screen (anything beyond very simple scripts can benefit from one), check the Show a Splash Screen box.
    • Set your CannyID and HelpID. These are the last part of the URL for the canny page or the help page.
    • Check "Include Example Controls" if you want your project to have some sample controls to use an an example. Uncheck to create a blank project.
  7. Click finish to generate your project. Then open the Designer and customize the provided default controls.

Quick Wizard

The Quick Wizard allows the same projects to be generated, but all of the settings are on a single page, and there are no previews to assist.

Use this wizard once you're familiar with the code generation, and no longer need the visual assistance.

The new project quick wizard.
  1. Program Options - These are the parts that appear as your form title, and on your About overlay.
  2. Navigation and Main Layout - Set your form name, navigation style, and which default groups to use.
  3. Pages
    • Main View is Split - Sets a global split, instead of per-page.
    • Page Grid - Each page is a new line. Set its properties, and select its type(s) from the drop-down menus.
    • If your main view is split, set the static page settings on the right.
  4. Other Options
    • Set if your program uses a splash screen.
    • Check "Include Example Controls..." to include sample controls. Uncheck to create a blank project.
  5. Click Finish to generate your code.

New Form Wizard

On the designer, click the new form button to open the menu. To create a dialog form, select "Dialog Form". You can also add a Dashboard Form with the new form wizard.

The new form menu.

The Form Wizard is almost exactly the same as the Full Wizard, but skips the program options steps, and only adds a form.

Screen and Application Standards

GridView/Dashboard View

The new project wizard can be used to create a GAB script in this style. Note that the wizard code may lag behind standards changes. You may need to add a Left Dock accordion control, and modify the standard elements to meet new screen standards.

An example dashboard using the new standards

Menu Bar

The menu bar can consist several standard elements, plus custom buttons and text fields. As many of the standard elements that can be used should be used. All 5 are available as properties on the form within the Form Designer. See the Dashboard Form page for more details.

Left Side Dock

The Left Side Dock is an Accordion Control. It should have two main parent groups. No additional top level groups should be in this accordion, except in very special cases.

Navigation - This group is automatically added and populated when you set the NavFrame property on your Accordion Control. It will list all of the pages of your Navigation Frame, with their Text and icon. These buttons are used to change the pages on your Navigation Frame.
View Modes - This group contains the standard and custom modes for the GridView. It has two sub-groups (Views and Custom Views) to hold these. The Views group should have one or more sub-items for applying view settings to the grid. The group is called "View Modes", and uses the SHOW_COLOR SvgPicture at Size (16,16)

Right Side Dock (Optional)

The Right Side Dock is an Accordion Control. It should have two main parent groups. Additional groups are permitted, as long as they adhere to style guidelines.

Functions - This is a collection of form buttons and functions, grouped logically. The group is called "Functions", and uses the FUNCTIONS_COLOR SvgPicture at Size (16,16)
Scripts - (Optional) If your GAB Script has Script buttons to call other GAB scripts or hooks, create this group with each script button as a sub-item. The group is called "Scripts", and uses the GAB_COLOR SvgPicture at Size (16,16)

Main Window Area

If you used the Wizard to create your form, simple add and remove controls to meet your form's needs.

  1. To the main window area, add a Navigation Frame.
  2. Select the frame (right click the page, and select the frame), then under the Pages property, add as many pages as you need. Set the title, and SvgImage (if desired).
  3. Set the Frame's Dock style to "Fill".
  4. Set the NavFrame property on your Left Dock AccordionControl to this Navigation Frame.
  5. Add a GsGridControl or GsObjectGridControl to the Navigation Page of your current page.
  6. Add any additional filters or menu items that only apply to the current page.
  7. Open the Layout Editor by clicking the button at the top right of the navigation page.
  8. Select any layout item, right click it, and select "Group" to add a group under "Root".
  9. If you have controls other than your grid, select one of them, right click, and select "Group" to create the Filters group.
  10. Drag and Drop all non-grid controls into the Filters group.
  11. Drag and Drop the Filters group above the Grid.
  12. On the customization form, select the group immediately under "Root" (The one that contains all other controls)
  13. Set these properties:
    1. GroupStyle - Title
    2. Padding - 0,0,0,0
    3. Spacing - 0,0,0,0
    4. Text - [Your caption, the view title usually]
    5. TextLocation - Top
    6. TextVisible - True
  14. Select your Filters Group (the one directly under your outer "Title" group, and set the following properties:
    1. GroupStyle - Light
    2. ExpandButtonVisible - True
    3. Padding - [Choose this yourself, based on the controls in it. If you have an Accordion Control on the right dock, left and right should be 0. Otherwise, just the left is 0.]
    4. Spacing - 0,0,0,0
    5. Text - "View Options" (Usually. Customize text as needed)
    6. TextLocation - Top
    7. TextVisible - True
  15. Select your grid's layout item and set the right padding and spacing to 0.

Other Views

[Standards for other views will be made available as they are created]

Internal Features of the Code Editor

Save As Origin

New File Menu with Save As Origin opened.
Main Menu > File > Save As Origin
If you're a Global Shop employee, you can now sign scripts using different department or customer IDs. To save using a Customer ID, type the customer ID (like GLO010) into the menu field, and click the button on the right side of the box.
Your options are based on your permissions:
R&D Department - You can save scripts using the R&D, Service, Consultant, and any Customer ID.
Service - You can save scripts using the Service or any Customer ID.
Consulting - You can save scripts using the Consultant or any Customer ID.
Customer/Third Party - You can only sign using your own ID.

Bar Internal Menu

Available on Dashboard Forms main menu bar.

An new "Internal" menu has been added. This menu ONLY appears when the script is run at Global Shop, and will not appear for customers. It is used for administrative controls. The script can be forced to run without this menu at Global Shop by creating a file called C:\ Most of the commands are similar to the ContextMenuCreate, etc commands already available.

   GUI.*form..InternalMenuAddItem(ItemName as string, ItemType {0-button; 1-combobox; 2-textbox; 3-separator} as Integer)
   GUI.*form..InternalMenuAddItem(ItemName as string, ItemTtype {0-button; 1-combobox; 2-textbox; 3-separator} as Integer, ItemText as String)
   GUI.*form..InternalMenuRemoveItem(ItemName as String)

Adds or removes a button, textbox, combobox, or separator to/from the internal menu.

   GUI.*form..InternalMenuAddComboItem(ItemName as String, ItemText as String)

Adds an option to the combobox's dropdown menu.

   GUI.*form..InternalMenuClearComboItems(ItemName as String)

Clears all options for the specified combobox.

   GUI.*form..InternalMenuSetItemEventHandler(ItemName as String, SubroutineName as String)

Sets a function that handles the click event for buttons, index change for combobox, or value change for textbox.

Run As External

Execute Settings dockable tool window
  • Force script to run in External Mode - Checking this box makes the GAB script think it's running at a customer location.

GAB Command Explorer

Main Menu > Tools > GAB Command Explorer
The main editor tab with four open and docked dialog windows

This is an internal tool in a very early state. At the moment, the functionality is limited, and there are some known issues, like freezing after the computer is locked and unlocked.

These issues will be corrected as time permits.

To launch the tool, open the GAB Code Editor, and select "GAB Command Explorer" from the Tools menu. If the menu item does not appear, then the tool has not been released to your team yet.

GAB Commands Tab

The GAB Commands Tab (available on the left dock navigator) lists all commands that are currently in Intellisense.

Some commands are incorrect or missing. Please report anything you find to using the GAB Code Editor Teams channel, so that the command can be fixed or added.

Left Navigation

On the left of this screen is a Command navigation list. All of the commands currently in GAB's Intellisense are listed here, and can be searched using the Find Command box.

The two menu items just above the grid allow you to insert wildcards and control types to find all related commands.

Command Overloads

The top section of the main area of the Explorer is the Command Overloads area. The Tile based grid shows each of the different argument overloads for the currently selected command.

  • The top row shows the number of arguments, and the description of the command (when available).
  • The middle rows show the complete list of arguments for this overload.
  • The bottom row shows the Sub-Detail text, when available.

To the right is the Overload Property Grid. When an overload is selected, this grid shows all the available properties for the selected overload.

Overload Arguments

The bottom section of the main area of the Explorer is the Overload Arguments area. This grid shows all of the arguments for the currently selected Overload (top section).

  • Select a row to view all of the argument's properties.
  • If the argument has a set of valid values, or a valid range, this can be viewed by expanding the ValidValuesCollection property on the Argument Overloads Property Grid.

GAB Enumerations Tab

The second tab on the left dock navigator is the GAB Enumerations tab. This tab contains a list of all the available Enum types available in GAB. Select a row in this grid to populate the main areas of the Explorer.

Enum Properties

This section shows the overall properties for this enumeration, like type, its name, and a default return for values that don't exist (if applicable).

Enum Entries

This section shows each of the available enum values for this type.

  • Select an enum value to show its properties in the grid on the right, including its actual value.

Future Plans

This tool is currently only available in Read-Only mode.

Future plans include an Intellisense edit request system. GSS employees will be able to use this tool to make corrections to intellisense, add and remove commands, etc. The requests are saved and the next time a GAB administrator logs in, they will check that the correction is valid, approve it, generate a new Intellisense file, and document the change.