Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Apple Guide Complete / Part 4 - Scripting Guide Files
Chapter 10 - Guide Script Command Reference / Guide Script Command Descriptions
/ Creating Hot Items


<Hot Text>

You can use the <Hot Text> command to create a hot button around specified text on a panel.

<Hot Text> hotText, whichOccurrence, eventFunction
hotText
A string specifying the hot text.
whichOccurrence
A value identifying which occurrence of the text specified in the hotText parameter should be considered hot. You can use the constants FIRST, LAST, and ALL in this parameter. The occurrence of the hot text applies only to the text in the immediately following text object, not all text objects on the panel.
eventFunction
A name of an event function or event list. You must also include any parameters expected by the function in parentheses following the event function name. You define event functions using the <Define Event> or <Define Event List> command. Guide Maker also provides built-in functions that you can specify in this parameter.
DESCRIPTION
The <Hot Text> command creates a hot button for the text specified in the hotText parameter. The area encompassing this rectangle acts as a "hot" area; that is, when the user clicks in the rectangle surrounding this text, Apple Guide calls the function defined by the eventFunction parameter. Usually such a function is used to send a specific Apple event.

The <Hot Text> command provides a method of specifying particular text and a specific occurrence of this text, such as all occurrences of the text within the text object, as hot text, as opposed to the <Hot Rectangle> command, which assumes the rectangle of the following object. Note that the hot text applies only to strings within the following text object (a string of text ended by a carriage return) not to all text in the panel.

EXAMPLES
<Define Panel> "spell-checking a document"
   #define hot text, and specify that every occurrence 
   # of the text in the following text object is hot
   <Hot Text> "Sharon's Super Dictionary", ALL, \xAC
                  openDictionary("Sharon's Super Dictionary")
   This panel provides information on Sharon's Super Dictionary. 
   <Pict> "Super Dictionary Pict", CENTER, "B&WPic File"

   <Hot Text> "Sharon's Super Dictionary", ALL, \xAC
                  openDictionary("Sharon's Super Dictionary")
   Sharon's Super Dictionary is a super dictionary. \xAC
   It provides lightning fast checking of all text in a document. \xAC
   In addition, Sharon's Super Dictionary supports WorldScript, \xAC
   and can spell-check a document in over 20 different scripts.

<End Panel>
SEE ALSO
For information on creating a hot object or hot text, see the descriptions of the <Hot Object> and <Hot Rectangle> commands on page 10-119 and page 10-120, respectively. For information on event functions, see "Specifying Events" beginning on page 10-177.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996