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 pathexists.lcdoc
More file actions
54 lines (36 loc) · 1.37 KB
/
exists.lcdoc
File metadata and controls
54 lines (36 loc) · 1.37 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
Name: exists
Synonyms: existence
Type: function
Syntax: exists(<object>)
Summary:
<return|Returns> true if the specified <object(glossary)> exists, false
if it does not.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
exists(card field 1)
Example:
exists(button "OK" of card "Preferences")
Parameters:
object:
Any object reference.
Returns (bool):
The <exists> function <return|returns> true or false.
Description:
Use the <exists> function to make sure an <object(glossary)> exists
before you try to perform an action on it, or to determine whether to
create an <object(glossary)>.
To find out whether any of a certain type of object exist, use the
<exists> <function> with the number 1. For example, exists(image 1)
<return|returns> true if there are any <image|images> on the
<current card>, and false otherwise.
You can also specify a chunk of a container, but in this case the
<exists> <function> always <return|returns> true.
>*Tip:* To find out whether a <file> or <folder> exists, or whether a
> <process> is running, use the <there is a> operator.
References: function (control structure), isNumber (function),
folder (glossary), current card (glossary), return (glossary),
process (glossary), object (glossary), file (keyword), image (object),
there is a (operator), there is no (operator), owner (property)
Tags: objects