name | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | stack, card, field, button, graphic, scrollbar, player, image, group | ||||||
Summary | Specifies the name of an object. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Property: HCAddressing, name, owner, ID, hilitedButtonName, label, titleWidth Message: nameChanged Keyword: file, characters, long, button, string, abbreviated, card, control Glossary: object, statement, standalone application, file path, property, folder, development environment, object reference, application bundle, execution error, main stack, OS X, pane, property inspector, current card, background, card control, object Function: clickStack, stacks, mainStacks Command: libURLSetLogField, group Object: player, stack | ||||||
Description | Use an object's name property to refer to the object. The short name of an object is simply the name that the object has been assigned. When you set an object's name property or type it into the object's property inspector, the short name is what you provide. The abbreviated name of an object is the object's type followed by the object's short name in quotes. For example, if a player's short name is Heaven, its abbreviated name is player "Heaven". If you don't specify a modifier for the name property, the abbreviated name is what you get. The long name of an object includes information about its owner (and about the owner of that object, and so forth). For example, suppose a stack named "My stack" contains a card named "My Card". This card has a group named "My Group" which contains a button named "My Button". The card also has a card field named "My Field". If "My Stack" is a main stack and it's in a file whose path is "/Drive/Folder/Stack.rev", the long names of these objects(object) look like this:
If the stack is a substack, its name is included in the long names of its objects, before the path of the main stack: stack "My Substack" of stack "/Drive/Folder/Stack.rev" The long name of a group includes the name of the current card. If the group does not appear on the current card, requesting its name results in an execution error. If you need to get the name of a group that is not on the current card, use the "background" terminology instead. The long name of a background includes the name of the current card, if the background appears on the current card. If not, the long name of the background includes the name of the first card the background appears on. You can use an object's name to refer to the object in a statement. However, the name need not be seen on screen, even if the object is one that normally has a visible name (such as a button). If a stack or control's label property is not empty, the label property is used when a visible label is displayed. If a stack's label property is empty, its name is used as the window title. Likewise, if a control's label property is empty, its name is used as the label. This means that you can use any string you want for the name without worrying about the user-interface impact on your application:if the name is not user-friendly, set the label to something that is. A stack's name cannot be empty. (Other objects(object) can have empty names.) Attempting to set a stack's name to empty does not rename it. If an object's name is empty, getting its name yields its ID property instead. In this case, the abbreviated ID form is always reported, regardless of what form of the name property you request.
| ||||||
Tags | objects |