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 pathIDChanged.lcdoc
More file actions
65 lines (46 loc) · 1.87 KB
/
IDChanged.lcdoc
File metadata and controls
65 lines (46 loc) · 1.87 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
Name: IDChanged
Type: message
Syntax: IDChanged <pOldID>, <pNewID>
Summary:
Sent to an <image> when its <ID> <property> is changed.
Associations: image
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
on IDChanged prevID,currentID -- update ID stored in another object
set the storedID[the short name of image ID prevID] of this stack \
to currentID
end IDChanged
Parameters:
pOldID:
The image's original ID number.
pNewID:
The image's new ID number.
Description:
Handle the <IDChanged> <message> if you want to make updates when an
<image(object)|image's> <ID> is changed.
The <ID> <property> of most <object|objects> is set when the
<object(glossary)> is created and cannot be changed. There are two
exceptions: <stacks> and <image(object)|images>.
You can set the <ID> of an <image> to any positive <integer>. Be careful
not to set an <image> <ID> to a number that's the <ID> of another
<image> in the same <stack> : since LiveCode uses IDs to keep track of
<object|objects>, a conflict may result in the inability to access one
or both <object|objects>. The following ID numbers are reserved and
should not be used for <image> IDs:
* 1-100: reserved for built-in cursors
* 101-135: reserved for built-in brush shapes
* 236-300: reserved for built-in patterns
* 301-1000: reserved for built-in icons
* 101,000-103,000: reserved
* 200,000-299,999: reserved for application use
The actual change is not triggered by the <IDChanged> <message>, so
<trap|trapping> the <message> and not allowing it to <pass> does not
prevent the <ID> from being changed.
References: pass (control structure), stacks (function),
object (glossary), property (glossary), trap (glossary),
message (glossary), image (glossary), image (keyword), integer (keyword),
nameChanged (message), stack (object), image (object), altID (property),
ID (property)
Tags: objects