Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit b39962c

Browse files
committed
[Interactive Tutorial] Edits to the Hello World tutorial
1 parent 2febd44 commit b39962c

1 file changed

Lines changed: 32 additions & 83 deletions

File tree

  • Toolset/palettes/tutorial/courses/First Run/tutorials/Hello World/lessons

Toolset/palettes/tutorial/courses/First Run/tutorials/Hello World/lessons/App Lesson.txt

Lines changed: 32 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@ prologue
55
show you how to create a simple 'Hello World' app.
66
end prologue
77

8-
step "Tutorial Intro I"
9-
In creating this app you will learn:
10-
11-
- How to build the user interface(UI) of an app by dragging and dropping objects
12-
13-
- The basics of coding in LiveCode to add user interactivity to your app
14-
15-
- How to use the features of the LiveCode Integrated Development Environment (IDE)
16-
action
17-
interlude
18-
go to step "Tutorials Intro"
19-
end step
20-
218
step "Tutorials Intro"
229
You can keep track of how much of the tutorial you have completed
2310
with this progress bar, and exit the tutorial at any time by
@@ -28,7 +15,7 @@ step "Tutorials Intro"
2815
idea about something or don't want to have to create every last
2916
part of the user interface, for example.
3017

31-
The tutorial will also help you out by disabling the parts of the IDE you
18+
The tutorial will also help you out by disabling any options you
3219
don't need for the current step.
3320
action
3421
interlude
@@ -39,27 +26,17 @@ end step
3926
skip point
4027

4128
step "Stack Interlude"
42-
In this first section of the tutorial, we will create the User
43-
Interface (UI) for the Hello World app.
44-
45-
The first step in creating a LiveCode application is creating a
46-
stack. A stack is the canvas for your app. Every window you see in LiveCode
47-
is a stack.
29+
We start by creating the User Interface (UI) for the Hello World app.
4830

49-
In this tutorial we will create our stack at the default size.
50-
action
51-
interlude
52-
go to step "Create Mainstack"
53-
end step
31+
The first step is to create a new LiveCode app at the default size.
5432

55-
step "Create Mainstack"
56-
Click on the File menu, and select 'New Stack' → 'Default Size'.
33+
Click on the File menu, and select 'New Stack' → 'Default Size'.
5734
action
58-
highlight menu item "Default Size" of menu item "New Stack" of menu "File"
59-
capture the next new stack as "Mainstack"
60-
capture the next new card of stack "Mainstack" as "HelloWorld"
61-
wait until there is a stack "Mainstack"
62-
go to step "Properties interlude"
35+
highlight menu item "Default Size" of menu item "New Stack" of menu "File"
36+
capture the next new stack as "Mainstack"
37+
capture the next new card of stack "Mainstack" as "HelloWorld"
38+
wait until there is a stack "Mainstack"
39+
go to step "Properties interlude"
6340
end step
6441

6542
skip point
@@ -72,35 +49,22 @@ step "Properties interlude"
7249
The Property Inspector is a window that allows you to control these properties.
7350
action
7451
interlude
75-
go to step "Set Stack Properties"
52+
go to step "Set Stack Properties"
7653
end step
7754

7855
step "Set Stack Properties"
79-
Click on the Inspector icon on the toolbar to open the Property
56+
Click on the 'Inspector' icon on the Toolbar to open the Property
8057
Inspector.
8158
action
8259
highlight toolbar "Inspector"
8360
wait until there is an inspector for stack "Mainstack"
84-
go to step "Property Inspector Interlude"
85-
end step
86-
87-
step "Property Inspector Interlude"
88-
Properties of objects are grouped into sections. You can hover over
89-
the icons at the top of the Property Inspector to see what each section is
90-
called.
91-
action
92-
interlude
93-
highlight inspector for stack "Mainstack"
9461
go to step "Set Stack Title"
9562
end step
9663

97-
skip point
98-
9964
step "Set Stack Title"
100-
The first property we will set is the 'Title' of the stack. You will see the
101-
title of the stack change after you set the property.
65+
Set the 'Title' property of the stack to "Hello World" and press 'Enter'.
10266

103-
Set the 'Title' of the stack to "Hello World".
67+
You will see the title of the stack change after you set the property.
10468
action
10569
highlight property "title" of section "basic"
10670
wait until the title of stack "Mainstack" is "Hello World"
@@ -123,7 +87,7 @@ action
12387
end step
12488

12589
step "Create Button"
126-
The first object we will add is a button icon. Clicking on this button will
90+
The first object we will add is a button. Clicking on this button will
12791
show a message to the user.
12892

12993
Drag a button from the tools palette onto your stack.
@@ -144,23 +108,18 @@ action
144108
end step
145109

146110
step "Open Property Inspector"
147-
Next we need to set some properties of the button. Remember that properties
148-
control how objects look and behave and can be set using the Property Inspector.
149-
150-
Click on the "Inspector" button in the toolbar to open the Property Inspector
111+
Click on the 'Inspector' icon in the Toolbar to open the Property Inspector
151112
for the button.
113+
114+
Remember that properties control how objects look and behave and can be set using the Property Inspector.
152115
action
153116
highlight toolbar "Inspector"
154117
wait until there is an inspector for button "hello"
155118
go to step "Set button name"
156119
end step
157120

158121
step "Set button name"
159-
The 'Name' property is what we use when we want to refer to objects in the code we write.
160-
161-
We want to use short, unique, descriptive names to make it easier when we start writing code.
162-
163-
Set the name property of the button to "Say Hello". You will see the Name appear on the button.
122+
Set the 'Name' property of the button to "Say Hello" and press 'Enter'. You will see the Name appear on the button.
164123
action
165124
highlight property "name" of section "Basic"
166125
wait until the name of button "Hello" is "Say Hello"
@@ -173,8 +132,7 @@ step "Events and messages interlude"
173132
Now that the UI is complete the next stage is to add code to the app
174133
to make it interactive.
175134

176-
LiveCode apps work by responding to 'messages', which are usually triggered by
177-
some kind of user action. A message might tell the app that the user has
135+
LiveCode apps work by responding to 'messages', which are usually triggered by some kind of user action. A message might tell the app that the user has
178136
clicked on a button or typed in a field. You add code to tell the app what
179137
to do when a message is received.
180138

@@ -186,7 +144,7 @@ action
186144
end step
187145

188146
step "Open Add Script"
189-
Select the button and click the Code button in the Toolbar.
147+
Select the button and click the 'Code' button in the Toolbar.
190148
action
191149
highlight toolbar "Code"
192150
wait until there is a script editor for button "Hello"
@@ -197,15 +155,6 @@ step "Script Editor Interlude"
197155
The Script Editor is a window that allows you to add code to the
198156
objects on your stack.
199157

200-
Some objects have a default script associated with then when you first open
201-
the Script Editor.
202-
action
203-
interlude
204-
highlight script editor for button "Hello"
205-
go to step "Script Editor Apply"
206-
end step
207-
208-
step "Script Editor Apply"
209158
Any code you have added in the Script Editor does not become live
210159
until you click on the 'Apply' button. When this is clicked, you will
211160
get feedback about whether the code you have written has any
@@ -256,25 +205,19 @@ step "Run Tool Interlude"
256205
the app user. For example, clicking on the 'Say Hello' button will show a hello message.
257206

258207
To test the code you have just added, we are going to enter Run mode and click the button.
259-
action
260-
interlude
261-
highlight tool "Run Mode"
262-
go to step "Run Mode"
263-
end step
264208

265-
step "Run Mode"
266209
Select 'Run mode' in the Tools Palette.
267210
action
268-
highlight tool "Run Mode"
269-
wait until the tool is run
270-
go to step "Test Button"
211+
highlight tool "Run Mode"
212+
wait until the tool is run
213+
go to step "Test Button"
271214
end step
272215

273216
step "Test Button"
274-
Click on the 'Say Hello' button to see the message.
217+
Click on the 'Say Hello' button to see the message.
275218
action
276-
interlude
277219
highlight button "hello"
220+
wait until button "hello" pops up answer dialog
278221
go to step "Next Steps"
279222
end step
280223

@@ -291,5 +234,11 @@ action
291234
end step
292235

293236
epilogue
294-
Congratulations on completing your first LiveCode app.
237+
Congratulations on completing your first LiveCode app. You have learned
238+
239+
- How to build the User Interface(UI) of an app by dragging and dropping objects
240+
241+
- The basics of coding in LiveCode to add interactivity to your app
242+
243+
- How to use the features of the LiveCode Integrated Development Environment (IDE)
295244
end epilogue

0 commit comments

Comments
 (0)