Important: The information in this document is obsolete and should not be used for new development.
<Else>
You can use the <Else> command to specify statements to execute when a condition specified by a previous <If> command evaluates to FALSE.
<Else>DESCRIPTION
You can use the <Else> command, preceded by an <If> command, to specify conditional execution of one or more commands. Use the <End If> command to signal the end of the conditional execution of the <Else> branch of the condition. Apple Guide executes the statements between an <If> command and an <Else> command only if the condition evaluates toTRUE
. Apple Guide executes the statements between an <Else> command and an <End If> command only if the condition evaluates toFALSE
.This is the general structure of conditional execution:
<If> condition statement(s) #executed if true <Else> statement(s) #executed if false <End if>You typically use conditional statements to dynamically adjust the sequence of panels presented to the user by specifying conditions that check the current state of user settings (such as radio buttons or checkboxes), other settings (such as the current date), or the state of the user's environment (such as whether a particular folder is open).SPECIAL CONSIDERATIONS
Every <Else> command must be preceded with a corresponding <If> command and followed by an <End If> command.EXAMPLES
<Define Sequence> "How do I create an index?" <Panel> "1st panel always display" <If> radioButtonState("Book Index", "1st panel always display") <Panel> "Panel 2 if true" <Panel> "Panel 3 if true" <Else> <Panel> "Panel 2 if false" <Panel> "Panel 3 if false" <End if> <Panel> "last panel always display" <End Sequence> <Define Sequence> "How do I create an index?" <Panel> "Index Choices 2" <If> radioButtonState("Book Index", "Index Choices 2") <Sequence> "How do I create a book index?" <Else> <Sequence> "How do I create a chapter index?" <End if> <End Sequence>SEE ALSO
For information on the <Define Context Check> command, see page 10-172. For information on the <If> command, see page 10-153.