You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: Toolset/palettes/tutorial/courses/First Run/tutorials/To Do List/lessons/App Lesson.txt
+40-19Lines changed: 40 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -542,9 +542,12 @@ action
542
542
end step
543
543
544
544
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.
546
547
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.
548
551
549
552
Add this handler to the script of the 'Delete' icon.
550
553
@@ -576,7 +579,8 @@ action
576
579
end step
577
580
578
581
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.
580
584
581
585
The task will be deleted from the list.
582
586
action
@@ -594,21 +598,27 @@ action
594
598
end step
595
599
596
600
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.
598
604
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.
600
608
action
601
609
interlude
602
610
go to step "closeStack handler"
603
611
end step
604
612
605
613
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.
608
616
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.
612
622
action
613
623
interlude
614
624
go to step "Select Stack For Editor"
@@ -623,19 +633,24 @@ action
623
633
end step
624
634
625
635
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.
627
638
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.
629
641
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.
631
644
action
632
645
highlight menu item "Stack Script" of menu "Object"
633
646
wait until there is a script editor for stack "Mainstack"
634
647
go to step "closeStack code"
635
648
end step
636
649
637
650
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.
639
654
640
655
Add this handler to the Stack Script and press 'Apply'.
641
656
script
@@ -651,10 +666,12 @@ action
651
666
end step
652
667
653
668
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.
656
672
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.
658
675
659
676
Add this handler to the Stack Script and press 'Apply'.
660
677
script
@@ -676,9 +693,13 @@ action
676
693
end step
677
694
678
695
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.
680
698
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
0 commit comments