This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathexit.lcdoc
More file actions
71 lines (54 loc) · 2.56 KB
/
exit.lcdoc
File metadata and controls
71 lines (54 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Name: exit
Type: control structure
Syntax: exit <handler>
Summary:
Stops <execute|execution> of a <handler>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
if the seconds > timeLimit then exit mouseUp
Example:
setProp myCustomProperty pValue
-- can be used in getProp or setProp handlers
exit myCustomProperty
end myCustomProperty
Parameters:
handler:
The name of the handler in which the exit control structure appears.
Description:
Use the <exit> <control structure> to skip the rest of a
<handler|handler's> <statement|statements> without <return|returning> a
result.
**Form:** The <exit> <statement> appears on a line by itself,
anywhere inside a <handler>.
You can use an <exit> <control structure> in a <message handler>,
<function handler>, <getProp handler>, or <setProp handler>. Usually,
<exit> is used within an <if> <control structure>, so that the <handler>
stops if a condition is true and continues if the condition is false.
If the current handler was called from another handler, the calling
handler continues executing. The <exit> <statement> only stops the
current <handler>, not the <caller|calling handler>. (To stop all
pending <handler|handlers>, use the <exit to top> <control structure>.)
When a handler executes an <exit> <statement>, the <message>, <trigger>,
<function call>, or <getProp call> stops and is not <pass|passed> to the
next <object(glossary)> in the <message path>. To halt the current
<handler> and <pass> the <message>, <trigger>, or <call> on through the
<message path>, use the <pass> <control structure> instead. To halt the
current <handler> and return a result, use the <return> <control
structure> instead.
>*Note:* The <exit> <control structure> is implemented internally as a
> <command> and appears in the <commandNames>.
References: call (command), return (constant),
getProp (control structure), return (control structure),
setProp (control structure), if (control structure),
pass (control structure), break (control structure),
on (control structure), exit to top (control structure),
exit repeat (control structure), function (control structure),
commandNames (function), object (glossary), function handler (glossary),
return (glossary), message handler (glossary), setProp handler (glossary),
pass (glossary), execute (glossary), function call (glossary),
command (glossary), control structure (glossary),
getProp handler (glossary), trigger (glossary), getProp call (glossary),
caller (glossary), message path (glossary), message (glossary),
statement (glossary), handler (glossary)