Livecode Documentation

This site is for Livecode documentation.

Here we provide a Creative Commons licensed version of the Livecode Documentation, supplemented with content from Wikipedia and other sources, together with articles sourced from the community and free culture licensed -creativecommons.org

For specific markup for elements of Livecode you may wish to take a look at Handler Documentation

Here is an example of how to document a Live Code Handler. See LiveCode Documentation Format Reference for further information.

# From the Mothership

Currently the dictionary files are in XML, which means they are rather opaquely swathed in tags. Some of these tags are meant to be rendered directly as HTML, while others are merely structural markings - livecode.com

Indeed, some of the older dictionary files contain extremely convoluted passages such as the following:

<description>Use the <b>accept</b> <glossary tag="command">command</glossary> when running a <glossary tag="server">server</glossary>, to accept <glossary tag="TCP">TCP</glossary> connections or <glossary tag="UDP">... </description>

…which can’t really be easily understood without, for example, displaying in a browser, or a field using the htmltext property. All of which makes it rather difficult to read and edit, and somewhat fragile too. So I spent some time recently thinking about how we could make dictionary files that are readable, extensible, and easy to adjust. Here is an example of the proposed format, again for the accept command:

Name: accept Type: command Syntax: accept [datagram] connections on port <number> with message <callbackMessage> Summary: Accepts an internet connection and creates a <socket> for that connection.

Ali Lloyd created a LiveCode highlight.js build, so that we could display LiveCode script in the colours familiar to you from the script editor. You can see the result of that in the code snippets in the above image - github

Much of this is in the early stages at the moment, so feedback is very welcome. If this or something like this does become the format of the dictionary files, we’ll immediately be seeking community help to improve our documentation. One of the primary objectives from my point of view would be to improve the examples. There are many examples in the dictionary which refer to not-necessarily-existant objects, or which rely on variables initialised outside of the example. It would be good if, as far as possible, the examples were self contained, and runnable; then they would hopefully be much more useful. I’d also like every parameter of the syntax to have as full a description as possible.

Transported image. source

Another important step we are taking is to include a table in every object’s dictionary entry, containing all of the messages and properties associated with that object. Here, for example is a snippet of how the image object’s new entry would look:

Let me know your thoughts in the comments.