The main diļ¬erence between widgets and libraries is that a widget draws to a pre-existing canvas. Apart from that, the authoring process is much the same for both extension types.
# Create a .lcb file
We recommend using the Atom text editor, available at https://atom.io/. A LiveCode package is available which provides some colorization as well as indentation. If you prefer to use TextWrangler, there is a colorizing script here. It should be placed in /Application Support/TextWrangler/Language Modules/
Start by creating a plain text file in a new directory and save it to disk with the extension "lcb":
/Desktop/widgettest/main.lcb
> Note: The extension builder currently relies on there being only one main module file in a given directory .
# Declare Type and Identifier
Start by declaring the type of extension, either "widget" or "library" followed by your identifier (See "Select A Developer ID" below).
widget community.livecode.beaumont.pinkCircle ## Code for your widget end widget
This is the unique identifier by which your extension will be referred to by the LiveCode Engine.
> Note: All LiveCode authored widgets are in the application package at /T ools/Extensions/. To play with one of these extensions we recommend copying the folder from the application package to your desktop and loading it from there. Changing the extension identifier in the source code will ensure it doesn't conflict with the existing extension.
# Next