Your First Program
It is very simple to create an application in LiveCode, by dragging objects onto your stack from the Tools Palette and adding code for the messages you want to respond to you can create a simple application in minutes.
This section will cover the basic controls and the most common messages associated with them.
Basic Controls
Start-up Screens
Version 6 Version 8/9
The large colorful window is the "Start Up" screen. It has much to look at and try. The next time you open up LiveCode, leave it up and explore some of it's offerings. Let us close it for now..
You should be a little familiar with the top "Edit bar" and the "Tool bar" on the left. If not, you should look at my links under "Getting Started" later on at home.
We need to open up a new "mainstack". On the "Edit" bar, click on "File", "New Mainstack"
Version 6 Version 8/9
When creating a LiveCode application the first step is to create a new mainstack, you do this by selecting New Mainstack from the File menu.
A new stack is created with 1 card.
Notice that it is named "Untitled". Let us give our stack (program) a name.
Before we do that, a little explanation is in order. Object Oriented languages treats everything as an object. Objects have properties (size, color, etc) and respond to events or messages (mouse clicks, drag and drop, etc). We use a "Property Inspector" to look at the properties and a "Code/Script" window in which you write code.
Now we will open up the Inspector for the Stack and change it's name.
On the "Edit" bar, click on "Object" and select the "Stack Inspector"
Alternatively, you can right-click with the mouse on the stack and open it through the menu (click on Stack Inspector)
You will see the Inspector window and some of the properties specific to the Stack
Version 6 Version 8/9
Change the "Name" from "Untitled" to Hello". (It will change when you click anywhere else)
Now drag a button from the "Tools" palette to your top card. Right-click on the button and pick "Button Property Inspector"
Change the name of the button to "Push Me".
Click on "Basic Properties" on the Inspector to see all of the other property screens that there are. (For v8, you click on the different icons on the "Property Inspector"
Browse through some of the other screens and see all the properties that you can change...
... add a drop shadow to your button
... change the background color of the button
... change the font and size
experiment - you can's do any harm and can always change it back