altID

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the altID of <object> to <IDNumber>
Associationsstack, card, field, button, graphic, scrollbar, player, image
Summary

Specifies an alternate ID for objects.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
put the altID of this card into myID
repeat while the altID of stack myStack <> 0
Values
NameTypeDescription
Value

The altID property of an object is a non-negative integer. By default, the altID for all objects is zero.

RelatedProperty: properties, ID, windowID
Message: IDChanged
Object: stack
Glossary: object, property
Description

Use the altID property to specify an additional ID for an object. Both the ID and the altID property are checked when you refer to an object by ID.

This property can be used to ensure compatibility with imported SuperCard and HyperCard stacks that assume buttons and fields are created with sequential IDs. You can also use the altID of a stack as a consistent way of referring to it, since the ID of a stack changes every time an object is created.

Important: Be careful not to set an object's altID property to the ID of an object of the same type. Since both properties are checked when you refer to an object by ID, doing this may cause the wrong object to be found because its altID property is the same as the ID of the object you want.

Tagsobjects