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

Commit 59d79ff

Browse files
authored
Merge pull request #1645 from livecode/bugfix-tutorial
Bugfix tutorial
2 parents 51e2498 + 1a4dc08 commit 59d79ff

4 files changed

Lines changed: 51 additions & 25 deletions

File tree

Toolset/palettes/inspector/revinspectortemplate.livecodescript

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on preOpenStack
88
put ideObjectTypesFromObjectList(sSelectedObjects) into sObjectTypes
99
revIDESubscribe "idePropertyChanged",sSelectedObjects
1010
inspectorTitleUpdate
11+
inspectorSetLabelsPreference
1112

1213
# Set the inspector behaviour
1314
dispatch "setAsBehavior" to revIDEInspectorBehavior() with the long id of me
@@ -238,18 +239,21 @@ on editorStoreValue pProperty, pValue
238239
end editorStoreValue
239240

240241
on idePreferenceChanged pPreference
241-
local tValue
242-
put revIDEGetPreference(pPreference) into tValue
243242
switch pPreference
244243
case "idePropertyInspector_labels"
245-
global gRevLanguageNames
246-
put tValue into gRevLanguageNames
247-
set the cLanguageNames of cd 1 of stack "revPreferences" to tValue
244+
inspectorSetLabelsPreference
248245
inspectorChanged
249246
break
250247
end switch
251248
end idePreferenceChanged
252249

250+
command inspectorSetLabelsPreference
251+
local tValue
252+
put revIDEGetPreference("idePropertyInspector_labels") into tValue
253+
global gRevLanguageNames
254+
put tValue into gRevLanguageNames
255+
set the cLanguageNames of cd 1 of stack "revPreferences" to tValue
256+
end inspectorSetLabelsPreference
253257

254258
# Sent by the IDE when a property has changed
255259
on revIDEPropertyChanged

Toolset/palettes/tutorial/courses/First Run/tutorials/BMI Calculator/lessons/App Lesson.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ action
12551255
end step
12561256

12571257
step "Set Item Icon"
1258-
Click the grey icon on the new row of the Navigation Data, to bring
1258+
Click the left hand icon on the new row of the Navigation Data, to bring
12591259
up the icon picker, and set the icon of the new navigation item to
12601260
the "bar chart" icon.
12611261
action

Toolset/palettes/tutorial/courses/First Run/tutorials/To Do List/lessons/App Lesson.txt

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,12 @@ action
542542
end step
543543

544544
step "Delete mouseUp"
545-
Just like for the 'Add' icon the 'Delete' icon will respond to the 'mouseUp' message.
545+
Just like for the 'Add' icon the 'Delete' icon will respond to the
546+
'mouseUp' message.
546547

547-
When the user clicks on the 'Delete' icon the task that is selected in the list will be deleted. We will confirm the deletion with the user before deleting the task.
548+
When the user clicks on the 'Delete' icon the task that is selected
549+
in the list will be deleted. We will confirm the deletion with the
550+
user before deleting the task.
548551

549552
Add this handler to the script of the 'Delete' icon.
550553

@@ -576,7 +579,8 @@ action
576579
end step
577580

578581
step "Test Delete Task"
579-
Select the first task and click the 'Delete' icon. Answer 'Yes' when presented with the delete options.
582+
Select the first task and click the 'Delete' icon. Answer 'Yes' when
583+
presented with the delete options.
580584

581585
The task will be deleted from the list.
582586
action
@@ -594,21 +598,27 @@ action
594598
end step
595599

596600
step "Saving Data Interlude"
597-
Once you have built your app into a standalone it can't be changed, so any data that should persist between uses of the app has to be saved outside the app itself.
601+
Once you have built your app into a standalone it can't be changed,
602+
so any data that should persist between uses of the app has to be
603+
saved outside the app itself.
598604

599-
We want the tasks we add to be saved when we close the app so we need to save the task list when the app is closed and read it in when the app is opened.
605+
We want the tasks we add to be saved when we close the app so we
606+
need to save the task list when the app is closed and read it in
607+
when the app is opened.
600608
action
601609
interlude
602610
go to step "closeStack handler"
603611
end step
604612

605613
step "closeStack handler"
606-
When a stack is closed it receives a 'CloseStack' message. Any clean up can
607-
be done in this handler.
614+
When a stack is closed it receives a 'CloseStack' message. Any
615+
clean-up can be done in this handler.
608616

609-
In this app we will save the list of tasks before the app is closed. The contents
610-
of the 'TaskList' field are saved to a text file in the 'Documents' folder, ready
611-
to be loaded in the next time the app is opened. There is a 'Documents' folder on all platforms so this code will work on desktop and mobile.
617+
In this app we will save the list of tasks before the app is closed.
618+
The contents of the 'TaskList' field are saved to a text file in the
619+
'Documents' folder, ready to be loaded in the next time the app is
620+
opened. There is a 'Documents' folder on all platforms so this code
621+
will work on desktop and mobile.
612622
action
613623
interlude
614624
go to step "Select Stack For Editor"
@@ -623,19 +633,24 @@ action
623633
end step
624634

625635
step "Open Stack Script"
626-
Just like the SVG icons and other objects a Stack can have code associated with it and receive messages.
636+
Just like the SVG icons and other objects a Stack can have code
637+
associated with it and receive messages.
627638

628-
The CloseStack message is sent to the stack so will be handled on the Stack Script.
639+
The CloseStack message is sent to the stack so will be handled on
640+
the Stack Script.
629641

630-
Click on the Object menu, and select 'Stack Script' to open the Script Editor for the stack.
642+
Click on the Object menu, and select 'Stack Script' to open the
643+
Script Editor for the stack.
631644
action
632645
highlight menu item "Stack Script" of menu "Object"
633646
wait until there is a script editor for stack "Mainstack"
634647
go to step "closeStack code"
635648
end step
636649

637650
step "closeStack code"
638-
In the closeStack handler we work out the full path to the text file that will be user to store the To To list and save the contents of the field to the text file.
651+
In the closeStack handler we work out the full path to the text
652+
file that will be used to store the To Do list and save the
653+
contents of the field to the text file.
639654

640655
Add this handler to the Stack Script and press 'Apply'.
641656
script
@@ -651,10 +666,12 @@ action
651666
end step
652667

653668
step "preOpenStack code"
654-
When a stack is opened it receives a 'PreOpenStack' message. Any set up can
655-
be done in this handler, before the stack becomes visible to the user.
669+
When a stack is opened it receives a 'PreOpenStack' message. Any
670+
set-up can be done in this handler, before the stack becomes visible
671+
to the user.
656672

657-
When the stack is opened we will load in the saved tasks form the text file in the 'Documents' folder.
673+
When the stack is opened we will load in the saved tasks form the
674+
text file in the 'Documents' folder.
658675

659676
Add this handler to the Stack Script and press 'Apply'.
660677
script
@@ -676,9 +693,13 @@ action
676693
end step
677694

678695
step "Save Standalone"
679-
Before you can prepare your app for sharing you need to set is up to build as a self contained, or 'standalone' app.
696+
Before you can prepare your app for sharing you need to set is up to
697+
build as a self contained, or 'standalone' app.
680698

681-
You set up this up by selecting the platforms you want to build for and setting some properties for the app. You then choose "Save As Standalone Application..." from the File menu. This will build the executable files for the selected platforms.
699+
You set up this up by selecting the platforms you want to build for
700+
and setting some properties for the app. You then choose "Save As
701+
Standalone Application..." from the File menu. This will build the
702+
executable files for the selected platforms.
682703

683704
For more details see this lesson
684705
url

notes/bugfix-19888.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix some minor typos and errors in interactive tutorials

0 commit comments

Comments
 (0)