Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
The delete
command removes text from a container, menu items from a menu, menus from the menu bar, and buttons or fields from the current card or background.
When you use the form delete part
, deleteButton
or deleteField
is sent to the object that's being deleted.
You can't use this command to delete a part
anywhere except on the current card.
Note: Using delete
to delete a line is not the same as putting empty
into the line: delete
removes the final return
character as well as the text, while putting empty
into the line just removes the text.
One of the following forms (or combinations thereof):
For example:
A chunk combined with of
and a container is called a chunk expression. For example: line 1 of card field "index"
Important: You can’t combine a stack name with a chunk expression—you can only refer to a chunk in the current stack.
HyperTalk Definition
A place where you can store and retrieve a value.
There are six types of containers in HyperCard: a variable, a button, a field, the selection, the Message box, and menus.
Additionally, you can refer to a button or field by its part number:
AppleScript Definition
An object that contains one or more other objects, known as elements of the container. In a reference, the container specifies where to find an object. You specify containers with the reserved words of
or in
.
You can also use the possesive form ('s
) to specify containers. For example, in
the container is first window
. The object it contains is a name property.
An expression that evaluates to one of the following:
For example:
An expression that evaluates to one of the following:
For example:
HyperTalk Definition
An expression that identifies a button by name, number, or id, using one of the following forms:
For example:
When used inside a button script: me
When a button receives a message: [the] target
A button can also be referred to as a part when you’re talking about its position among all buttons and fields within the same card or background.
AppleScript Definition
An expression that identifies a button by name, number, or id, using the same forms as HyperTalk except that “background” must be used in place of “bkgnd”.
An expression that identifies a field by name, number, or id using one of the following forms (in AppleScript, use “background” in place of “bkgnd”):
-- name
card field id 3894
card field "My Notes"
card field 1
first card field
background field 3 of card 1
An expression that identifies a button or field by its ordinal position among all buttons and fields on the same card or bkgnd. A button's or field’s part number is available in its Info dialog box; in a script, it is available in the object’s You can use any of these forms: [card] part posInteger [bg] part posInteger ordinal [card] [bg] part card part 5 first card part last background partpart
partNumber
property.