Installing an LCB Library

Elanor Buchanan September 1, 2016 3

Installing the library into the LiveCode IDE The Extension Builder is also used to install libraries. Installed libraries are loaded each time LiveCode is started up. Extensions are installed into your My LiveCode folder. Open the Extension Builder from the Tools menu. Click the Open button and load the “HelloWorldLibrary.lcb” file. Click the Install button

LCB Canvas Operations

Elanor Buchanan July 5, 2016 4

The onPaint handler This widget is very simple so only the OnPaint handler is required to draw the widget. The OnPaint handler will be a public handler which takes no parameters and does not return a value. Add the OnPaint definition to the widget code. public handler OnPaint() end handler There are a number of

LCB Module Level Variables

Elanor Buchanan July 5, 2016 5

LiveCode Builder Module Level Variables A variable definition defines a module-scope variable. In a widget module, such variables are per-widget (i.e. instance variables). In a library module, there is only a single instance (i.e. a private global variable). Module-scope variables in LCB are similar to script local variables in LiveCode Script. The syntax for declaring

Type Conversion between LCB and LiveCode Script

Elanor Buchanan July 5, 2016 6

When a value is returned to LiveCode from a LiveCode Builder library what type will it be? Because LCB is strongly typed and LiveCode Script is weakly typed for most LCB types we don’t need to worry about it. nothing Boolean Integer Real Number String Data All these types can be used directly in expressions

LCB Lists and Arrays

Elanor Buchanan July 5, 2016 7

Two important types in LCB, which deserve some more attention are lists and arrays. list – a list is a sequence of values, each element of the sequence is assigned a numerical index, starting with 1 and proceeding sequentially array – an array is a mapping from a string to any value (i.e. an associative

Including an LCB library in a standalone

Elanor Buchanan June 8, 2016 8

Including the library in a standalone If you have created a LiveCode app that uses a library and want to build it into a standalone you must ensure the library is included in the standalone file. Choose File -> Standalone Application Settings On the General Pane you can choose to let LiveCode search for inclusions