previous chapter contents page top page next chapter


IndexCard

February 29, 1996

inherits from Card;
   

Class Description

Index cards display the indexes for pieces of the name cards list. Each index card lists the names for two letters of the alphabet. You'll be thrilled to learn that there are exactly thirteen index cards in the whole system, all in the name cards stack. A typical index card is depicted above.

Programming information

Instantiate: sometimes
Subclass: rarely
Call its methods: rarely

You'll rarely need to call the methods of class IndexCard, though you might accidentally call AddressCard on index cards if you cycle through all the cards in the name cards stack.

Methods defined by class IndexCard

Class IndexCard defines the following methods:

Method Description
AboutToShow Overridden to set the lists and titles of the two list views on this page
SendToBack Overridden to keep the index tabs behind the card

Fields defined by class IndexCard

Class IndexCard defines the following fields:

Field Type Description
Inherited from SingleLinkable
next Object Next item in view list
Inherited from Linkable
previous Object Previous item in view list
Inherited from Viewable
superview Viewable Container for this object
subview Viewable Object contained by this object
relativeOrigin Dot Origin relative to superview
contentSize Dot Size of content rectangle
viewFlags Unsigned Property settings
labelStyle TextStyle Text style of object's label
color Color Color of object's content
shadow Shadow Shadow drawn with object
sound Sound Sound associated with object
Inherited from Card
globalscreenRedrawCount Unsigned Used to keep track of the number of times screen has is redrawn while showing this card
form Object Form drawn with this card
stack Stack Stack that contains the card
cardFlags Unsigned Various settings for cards
Defined by IndexCard
letterIndex Unsigned The index for the first of the two letters on this page, where 1=`A', 2=`B', and so on
listView1 ListView The list view that displays address cards beginning with the first letter on this page
listView2 ListView The list view that displays address cards beginning with the second letter on this page

Here's object definition for the index card shown at the beginning of this chapter:

Instance IndexCard 'S' 5168;
           next: nilObject;
       previous: nilObject;
      superview: nilObject;
        subview: nilObject;

 relativeOrigin: <-28.0,7.5>;
    contentSize: <392.0,229.0>;
      viewFlags: 0x10005000;
     labelStyle: iBook12;
          color: 0;
       altColor: 0;
         shadow: nilObject;
          sound: nilObject;
           form: (Form 'addresses index' 5172);
          stack: (NameCardsStack 'all' 53);
      cardFlags: 0x004100D3;
    letterIndex: 19;
      listView1: (ListView 5174);
      listView2: (ListView 5178);
End Instance;

Attributes defined by class IndexCard

Class IndexCard defines one attribute:

Attribute Type Description
AddressCard AddressCard The getter always returns nilObject; this attribute is here to allow lazy callers to iterate all the way through the name cards stack without checking to see if each item is a name card