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 223
Expand file tree
/
Copy pathcall.xml
More file actions
executable file
·65 lines (51 loc) · 4.04 KB
/
Copy pathcall.xml
File metadata and controls
executable file
·65 lines (51 loc) · 4.04 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
<doc>
<legacy_id>1069</legacy_id>
<name>call</name>
<type>command</type>
<syntax>
<example>call <i>handler</i> [of <i>object</i>]</example>
</syntax>
<synonyms>
</synonyms>
<summary><glossary tag="execute">Executes</glossary> the specified <glossary tag="handler">handler</glossary> in any <glossary tag="object">object'sscript</glossary>.</summary>
<examples>
<example>call "mouseUp"</example>
<example>call "mouseUp" of button 1 of card 1</example>
</examples>
<history>
<introduced version="1.0">Added.</introduced>
<deprecated version=""></deprecated>
<removed version=""></removed>
<experimental version=""></experimental>
<nonexperimental version=""></nonexperimental>
</history>
<objects>
</objects>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
</classes>
<security>
</security>
<classification>
</classification>
<references>
<function tag="params">params Function</function>
<function tag="value">value Function</function>
<command tag="do">do Command</command>
<command tag="send">send Command</command>
<command tag="start using">start using Command</command>
<command tag="insert script">insert script Command</command>
<property tag="defaultStack">defaultStack Property</property>
<control_st tag="pass">pass Control Structure</control_st>
</references>
<description>Use the <b>call</b> <glossary tag="command">command</glossary> to use a <glossary tag="handler">handler</glossary> that's not in the normal <glossary tag="message path">message path</glossary>.<p></p><p><b>Parameters:</b></p><p>The <i>handler</i> is any <glossary tag="handler">handler</glossary> in the <property tag="script">script</property> of the specified <i>object,</i> along with any <glossary tag="parameter">parameters</glossary> that <glossary tag="handler">handler</glossary> requires, separated by commas. The entire <i>handler</i> including <glossary tag="parameter">parameters</glossary> must be enclosed in quotes.</p><p></p><p>The <i>object</i> is any object reference. If no <i>object</i> is specified, LiveCode uses the current <glossary tag="object">object</glossary>.</p><p></p><p><b>Comments:</b></p><p>The <b>call</b> <glossary tag="command">command</glossary> sends a <i>handler</i> <keyword tag="message box">message</keyword> to the <i>object</i>. If the <property tag="script">script</property> of the <i>object</i> doesn't <glossary tag="trap">trap</glossary> the <i>handler</i> <keyword tag="message box">message</keyword>, the <keyword tag="message box">message</keyword> is <glossary tag="pass">passed</glossary> to the next <glossary tag="object">object</glossary> in the <i>object's</i> <glossary tag="message path">message path</glossary>.</p><p></p><p>When executing a handler invoked by the <b>call </b>command the <property tag="defaultStack">defaultStack</property> remains the same as it was when the <b>call </b>command was issued. Therefore any object references in the called handler are evaluated in the context of the call command that invoked the handler. For example, <i>button 3 </i>may commonly refer to button 3 of the current card of the stack from which the target handler was called.</p><p></p><p>This differs from the <command tag="send">send</command> <glossary tag="command">command</glossary> which temporarily changes the context so that object references are evaluated in the context of the object containing the target handler.</p><p></p><p></p><p></p><tip>If a <glossary tag="handler">handler</glossary> contains complex <glossary tag="parameter">parameters</glossary>, especially if some <glossary tag="parameter">parameters</glossary> contain <glossary tag="double quote">double quotes</glossary>, it may be simpler to put the <keyword tag="message box">message</keyword> name and <glossary tag="parameter">parameters</glossary> into a <glossary tag="variable">variable</glossary>, then use the name of the <glossary tag="variable">variable</glossary> in the <b>call</b><glossary tag="statement">statement</glossary>.</tip></description>
</doc>