TweetFollow Us on Twitter

June 94 - Displaying Hierarchical Lists

Displaying Hierarchical Lists


[IMAGE 058-078_Minow_REV1.GIF]

Much of the data you manage on a Macintosh has a hierarchical nature. This article shows how your application can provide a clear, coherent data organization with a user-controlled display by using classic linked lists, storing the list data in handles, and displaying it with the List Manager. A triangular button mechanism, similar to that used in the Finder to open and close folders in list views, lets the user decide how much data to view on the screen.

If your application makes its hierarchical data accessible but not overwhelming, it will have an advantage over applications that provide only two alternatives -- "throw it all on the screen" or "hide everything." You can find many examples of flexible organization: The Finder presents file and folder information in a variety of display formats revealing more or less information according to the user's own desires. Document-based applications such as NewsWatcher provide a hierarchy of text information. The JMP statistical application provides buttons that reveal more detailed information about an analysis. Programming languages such as Frontier allow the programmer to display as much of a module's code as is needed.

This article shows how to do the following:

  • store hierarchical data in a linked list along with the information needed to display it properly
  • extend the List Manager by storing a button object in a List Manager cell that controls how the data hierarchy is displayed
  • build the data hierarchy and display it
  • let the user manipulate the buttons to view more or less of the data

The accompanying code on this issue's CD includes a sample library that stores data, displays it, and manages the buttons, and a simple application that uses the library. The techniques described in the article are appropriate for displaying and organizing moderate amounts of data; they're less useful for static data or large amounts of data and are inefficient with small amounts of data.

Figure 1 shows a Finder-like window that was created with this library; the files displayed are from the sample library. I've called the libraryTwistDown to emphasize how the display acts when you click the buttons. The Finder development team calls the buttonstriangular buttons .

[IMAGE 058-078_Minow_REV2.GIF]

Figure 1. Window created with TwistDown library


There isn't much in this article on linked lists or handles; I assume you struggled with "classical" list processing when you learned to program and have done enough programming on the Macintosh to understand how handle-based storage operates. Keep in mind that two kinds of lists are discussed here: linked lists and Macintosh List Manager display lists. To keep confusion to a minimum,element refers to a component of a linked list andcell refers to a component of a List Manager list. Note also that linked lists contain the data, while the List Manager list only controls the appearance of that data. A good understanding of the List Manager is needed to follow the code examples later in the article. (For details on the List Manager, seeInside Macintosh: More Macintosh Toolbox , or Inside Macintosh Volume IV.)

In the context of this article, a list element is a chunk of data, a few flags, and two linkages. This section discusses the linkages, which connect list elements into sequences and hierarchies, and the creation and disposal of list elements. The flags, which simplify formatting the data, are discussed later in the section "Controlling Data Appearance."

Figure 2 illustrates the linkages that connect list elements. The important thing to remember about the hierarchical linked lists we're using is that any element may have asuccessor -- the sibling element that follows it -- and adescendant -- a child element that begins a lower level of the hierarchy. For example, a document outline has a sequence of chapters (siblings) and each chapter has, as its descendants, a sequence of sections.

In the sample code, each list element is stored in a handle. This allows the Memory Manager to reorganize memory to store data efficiently. However, don't forget that the application program is responsible for disposing of data that's no longer needed.

Two library functions manage the list elements: MakeTwistDownElement creates an element and connects it to the list hierarchy and DisposeTwistDownElement deletes an element along with its descendants and successors.

[IMAGE 058-078_Minow_REV3.GIF]

Figure 2. List element organization

Listing 1 shows the definition of our element structure, TwistDownRecord. Each field of this structure will be explained as it's encountered in the sample code.

Listing 1. TwistDownRecord

struct TwistDownRecord {
  struct TwistDownRecord  **nextElement; /* -> successor element  */
  struct TwistDownRecord  **subElement;  /* -> descendant element */
  short                   indentLevel;   /* Indentation depth */
  unsigned short          flag;          /* Control flags */
  unsigned short          dataLength;    /* Actual data length */
  unsigned char           data[1];       /* Data to display */
typedef struct TwistDownRecord  TwistDownRecord,
        *TwistDownPtr, **TwistDownHandle;

MakeTwistDownElement (Listing 2) is called with the data to store in the element and a handle to its predecessor. The predecessor is either NULL or the previous (elder) sibling element. For example, when creating element 3 in the list shown in Figure 2, the previous element is element 1.

TwistDownRecord is a variable-length structure and NewHandle creates an instance that's large enough to hold the caller's data record. The structure definition, however, contains one bit of trickery that's required by the ANSI C standard -- it must specify at least one byte for the data [] placeholder. This is why the parameter to NewHandle adjusts the handle size to eliminate the extra byte.

The DisposeTwistDownHandle function disposes of a list element and then disposes of its descendant and successor lists. To dispose of an entire list, call this function with the first list element.

A simplified version of DisposeTwistDownHandle is shown in Listing 3. The library implementation allows the application developer to specify a function that's called when disposing of each element in the list. This is needed if an application has to store complex structures -- themselves containing Ptr or Handle references -- in a TwistDownHandle.

Listing 2. MakeTwistDownElement

OSErr MakeTwistDownElement(TwistDownHandle  previousElement,
                           short            indentLevel,
                           unsigned short   dataLength,
                           Ptr              dataPtr,
                           TwistDownHandle  *result)
    TwistDownHandle twistDownHandle;

    twistDownHandle =
        (TwistDownHandle) NewHandle(sizeof(TwistDownRecord) 
                        - sizeof(unsigned char) + dataLength);
    *result = twistDownHandle;
    if (twistDownHandle != NULL) {
        if (previousElement != NULL)
            (**previousElement).nextElement = twistDownHandle;
        (**twistDownHandle).nextElement = NULL;
        (**twistDownHandle).subElement = NULL;
        (**twistDownHandle).indentLevel = indentLevel;
        (**twistDownHandle).flag = 0;
        (**twistDownHandle).dataLength = dataLength;
        if (dataPtr != NULL)
            BlockMove(dataPtr, (**twistDownHandle).data, dataLength);
    return (MemError());

Listing 3. DisposeTwistDownHandle

void DisposeTwistDownHandle(TwistDownHandle twistDownHandle)
    TwistDownHandle nextElement, subElement;

    while (twistDownHandle != NULL) {
        nextElement = (**twistDownHandle).nextElement;
        subElement = (**twistDownHandle).subElement;
        DisposeHandle((Handle) twistDownHandle);
        if (subElement != NULL)
        twistDownHandle = nextElement;

Note that DisposeTwistDownHandle is a recursive function; it calls itself to dispose of the descendants of a hierarchy. If it's called with the list shown in Figure 2, it disposes of elements in the order 1, 2, and 3.

Using recursion simplifies the list-management algorithms in the TwistDown function library. However, it's not without its pitfalls in the real world. Each time a function such as DisposeTwistDownHandle encounters a subelement list, it calls itself to dispose of that list, and each of these calls uses stack space. While this isn't usually a problem for applications, you should avoid recursive algorithms in device drivers or other nonapplication code segments because they must work within the constraints of some other application's stack.*


Once the data is organized as a hierarchical list, the application could simply display the whole list by just storing handles to the list elements in List Manager cells. However, if your application lets the user control how much of the data is displayed, there must be a way for the user to browse through the data and to specify which elements are visible and which are hidden.

A familiar mechanism for doing this exists in the Finder, where small buttons indicate which cells have subhierarchies and whether the subhierarchy is visible. These triangular buttons have two stable states: one for closed (invisible) hierarchies and one for open (visible) hierarchies. There are also three transient states: an intermediate button is displayed briefly when the user clicks a triangular button to change between the open and closed states; and the closed and open buttons are drawn filled when a mouse-down event is located on the button. To manage these buttons and the display of visible data, each list element needs a few flags and an indentation variable. These are stored in the TwistDownRecord structure.

The indentation variable -- indentLevel -- specifies the hierarchical depth of an element and is used to display sublists so that the data for an element appears under its parent, but indented to show its place in the hierarchy.

The bits in the flag field are used to record the record's state and to communicate between the application and the List Manager's list definition function (LDEF):

/* These are the values that can appear in the flag word. */
#define kHasTwistDown      0x0001  /* This element has a sublist */
#define kShowSublist       0x0002  /* Display the sublist content */
#define kOldShowSublist    0x0004  /* Saved kShowSublist state */
#define kSelectedElement   0x0008  /* Copy "selected" from list */
#define kDrawButtonFilled  0x0010  /* Signal "mouseDown" in button */
#define kOnlyRedrawButton  0x0020  /* Signal "tracking mouse" */
#define kDrawIntermediate  0x0040  /* Draw the animation polygon */
#define kEraseButtonArea   0x0080  /* Need complete button redraw */

The flag field is defined as an unsigned short with explicitly defined bits rather than as a bitfield, which would have made the program slightly easier to read. However, the ANSI C standard doesn't specify how the bits in a bitfield are arranged, and different compilers are free to choose their own organization of the bits. This means that if you write parts of your code using several compilers, or distribute modules in object form for others to use, you may cause a debugging nightmare. This is especially true if you use bitfields to construct data records that are sent in network messages between different systems. The flag bits could have been defined as an enum, but this can also cause portability problems. Using explicit bit definitions will also make it easier to convert your code to run on the Power Macintosh. *

The first four flag bits have the following meanings:

  • kHasTwistDown is set if the element should have a triangular button when it's drawn. While you might assume that the existence of a non-null subElement pointer would be sufficient, the Finder illustrates a better design: it displays triangular buttons for all folders, even if there are no files in a folder. This immediately tells the user that the line on the display represents a folder, rather than a file.
  • kShowSublist is set if the sublist should be displayed. This is normally controlled by the user clicking a triangular button, which changes the kShowSublist state.
  • kOldShowSublist is used to save the old kShowSublist setting in case you need to temporarily change the display hierarchy. This lets you undo a display state change or provide a Show All Hierarchies command. It's not used in the sample code.
  • kSelectedElement records the selection state of the list cell. It's needed to properly retain the selection status of visible cells.

The other flag bits are needed to handle mouse events. They're set by the mouse-down event handler and the LDEF references them to control its actions:

  • kDrawButtonFilled is set when the user presses a button (the cursor is over a triangular button while the user has the mouse buttton held down). It causes the LDEF to fill the triangular button to indicate that the user is pressing it.
  • kOnlyRedrawButton is set to constrain the LDEF so that the entire display line doesn't blink when the user presses a button. As the user moves the cursor in and out of the button, the drawing procedure must redraw the button to show whether the user is pressing the button. However, there's no need to redraw the actual data contents. This flag tells the LDEF to redraw only the button.
  • kDrawIntermediate is set when the user releases the mouse button within the button area: the button state changes from closed to open or vice versa. To indicate this change, the LDEF draws the button in an intermediate state, delays for an instant, and then draws the button in its new, stable state.
  • kEraseButtonArea is set to erase the button area before it's drawn. If not set, the button is redrawn in its new form, but not erased; this eliminates unnecessary button flicker.

The TwistDown library uses the following four macros internally to access the flag word:

#define SetTDFlag(tdHandle, mask)      ((**tdHandle).flag |= (mask))
#define ClearTDFlag(tdHandle, mask)    ((**tdHandle).flag &= ~(mask))
#define InvertTDFlag(tdHandle, mask)   ((**tdHandle).flag ^= (mask))
#define TestTDFlag(tdHandle, mask) (((**tdHandle).flag &(mask)) != 0)


When you first look at the List Manager, it may appear to be the solution to all your display needs. Unfortunately, it has a number of characteristics that restrict its usefulness. It's designed to store limited amounts of data, and performance slows appreciably as you increase the number of cells or the amount of data stored in the cells. Also, if your list cells are not all the same size or your application needs fine control over scrolling, you'll probably find life simpler if you create your own function library. For example, both MacApp and the THINK Class Library offer flexible libraries for displaying and managing structured data. However, the List Manager serves well for straightforward lists of a small number of items -- and with the addition of the triangular buttons it becomes a very useful tool.

The TwistDown subroutine library creates a one-column list with a vertical scroll bar. The code has only two unusual features:

  • NewTwistDownList stores a small amount of private information in a handle that's stored in the userHandle field of the list record. This includes a pointer to a user-defined drawing function, the display font and font size, and a flag that signals whether clicking on cell data should highlight the cell contents.
  • It establishes a private LDEF that manages the visual display. Normally, the LDEF is stored in a resource. In the sample code, however, it's linked into the application and a stub resource is created for the benefit of the List Manager. This stub, a three-instruction procedure that the List Manager calls, jumps to the twist- down LDEF. This is not necessary for this library -- it could have been separately compiled -- but is useful for debugging and for LDEF procedures that need to access application globals.

When you recompile this program to run on a Power Macintosh as a "native" application (rather than in 680x0-compatibility mode), you'll have to redo this sequence slightly. The time to worry about conversion is now, before your customers are tapping you on the shoulder asking, "Not today? How about next Tuesday?" There's more on converting for Power Macintosh at the end of this article. *

Note that there are two separate drawing procedures: the twist-down LDEF manages the buttons and drawing for simple text displays, while the application program can specify its own drawing function to draw more complex data.

The twist-down LDEF requires a small amount of global information to properly process the list. This is stored in a handle-based structure defined as shown in Listin g 4. Two Boolean variables in this record haven't been described: canHiliteSelection and isLeftJustify. The canHiliteSelection field controls whether the LDEF highlights selected cells. The isLeftJustify flag is set for left-to-right languages (such as English) and cleared for languages such as Arabic and Hebrew. This flag isn't used in the code shown in this article, but the TwistDown library on the CD shows how an application might handle a right-to-left language.

The triangular buttons are defined as QuickDraw polygons, rather than as bitmaps, with the advantage that the function is independent of the list cell size and script direction. This is useful for localization or for programs used by people who are visually impaired or have diminished motor skills: the program will display larger buttons if the application or user chooses a large font. It also lets the program draw the closed and intermediate buttons pointing in the proper direction for right- to-left script systems such as Arabic and Hebrew. Figure 3 illustrates an expanded view of the triangular buttons. As an example, the code in Listing 5 shows how you would create the polygons for a left-to-right script. See the sample on the CD for more general code, which accounts for the writing direction of the script.

Listing 4. TwistDownPrivateRecord

struct TwistDownPrivateRecord {
  TwistDownDrawProc   drawProc;   /* User-defined drawing function */
  PolyHandle          openTriangle;         /* The expanded button */
  PolyHandle          closedTriangle;         /* The closed button */
  PolyHandle          intermediateTriangle;   /* Animation */
  short               tabIndent;              /* Child indentation */
  short               fontSize;               /* For TextSize */
  short               fontNumber;             /* For TextFont */
  Boolean             canHiliteSelection;     /* Highlight cell OK? */
  Boolean             isLeftJustify;          /* GetSystJust value */
  short               triangleWidth;          /* Button width */
typedef struct TwistDownPrivateRecord   TwistDownPrivateRecord,
        *TwistDownPrivatePtr, **TwistDownPrivateHandle;

[IMAGE 058-078_Minow_REV10.GIF]

Figure 3. The triangular buttons


After creating the List Manager list, the application builds its hierarchical structure (the linked list). List elements are created by the MakeTwistDownElement function. As described earlier in "Creating a List Element," MakeTwistDownElement obtains the necessary (handle) storage, initializes all flags, and stores the application data in the list element. It also links the new element to the previous (elder sibling) element in the list.

Normally, a twist-down list is built by a recursive function such as the one shown in Listing 6, MyBuildHierarchy. MyBuildHierarchy calls a function named MyGetInfo that stores a small amountof data into a structure called MyInfoRecord. Neither of these is defined here: they're application specific.


After you've built the data hierarchy, the next step is to determine which elements are visible initially and build the visible list. The CreateVisibleList function constructs a new visible display given the head of a hierarchical list and a List Manager handle. It stores the head in the first cell (cell [0, 0]) and calls BuildVisibleList to store the visible elements in the subsequent cells.

Listing 5. Creating triangular button polygons

buttonSize = info.ascent;          /* The button height */
buttonSize &= ~1;              /* Round down to an even number */
halfSize = buttonSize / 2;         /* For 45-degree triangles */
intermediateSize = (buttonSize * 3) / 4;
(**privateHdl).openTriangle = OpenPoly();
    MoveTo(0, halfSize);
    LineTo(buttonSize, halfSize);
    LineTo(halfSize, buttonSize);
    LineTo(0, halfSize);
(**privateHdl).closedTriangle = OpenPoly();
    MoveTo(halfSize, 0);
    LineTo(buttonSize, halfSize);
    LineTo(halfSize, buttonSize);
    LineTo(halfSize, 0);
(**privateHdl).intermediateTriangle = OpenPoly();
    MoveTo(intermediateSize, 0);
    LineTo(intermediateSize, intermediateSize);
    LineTo(0, intermediateSize);
    LineTo(intermediateSize, 0);

Listing 6. Building a twist-down list

TwistDownHandle MyBuildHierarchy(ListHandle theList,
                    short indentLevel)
    OSErr           status;
    TwistDownHandle previousElement, thisElement, firstElement;
    MyInfoRecord    myInfoRecord;
    Boolean         isHierarchy;
    EventRecord     currentEvent;

    firstElement = NULL;
    previousElement = NULL;
    /*** Other initialization here */
    do {
        /*** Call EventAvail here to give time to background tasks.*/
        EventAvail(everyEvent, &currentEvent);
        status = MyGetInfo(&myInfoRecord, &isHierarchy);
        if (status == noErr)
            status = MakeTwistDownElement(previousElement,
                indentLevel, sizeof(MyInfoRecord),
                (Ptr) &myInfoRecord, &thisElement);
        if (status == noErr) {
            /*** Remember the first element in this sibling        */
            /*** sequence;                                         */
            /*** it's needed by our caller.                        */
            if (firstElement == NULL)
                firstElement = thisElement;
            /*** If this data begins a hierarchy, descend by       */
            /*** calling this function recursively. Store the      */
            /*** first element of the new sublist in the           */
            /*** subElement pointer. (flag & kHasTwistDown)    */
            /*** will be TRUE even if the child list is empty.     */
            if (isHierarchy) {
                SetTDFlag(thisElement, kHasTwistDown);
                (**thisElement).subElement =
                        MyBuildHierarchy(theList, indentLevel + 1);
            /*** Set sibling linkage for next element.             */
            previousElement = thisElement;
    } while (status == noErr);
    return (firstElement);

BuildVisibleList is called in two situations: when the application first constructs the list and when the user changes the visual hierarchy by clicking a triangular button. It calls CountVisibleElements to determine the number of cells needed, adjusts the size of the list to the desired number, and calls a recursive function, SetElementsInList, to do the actual storage. SetElementsInList needs what is essentially a global counter to know which cell will receive the current list element.

BuildVisibleList associates list cells with elements in the hierarchical list as follows:

  1. It copies the current selection status of each list cell from the List Manager cell to the associated TwistDownHandle element.
  2. It counts the number of elements that will be displayed and adds or removes rows from the List Manager list as needed.
  3. Finally, it stores references to the visible elements in the list cells, updating the selection status as needed.

The utility functions used in adding and removing elements from the List Manager list aren't shown here but may be examined in the sample library. BuildVisibleList uses several local, recursive functions to process the hierarchical list that all have a similar overall structure. For example, CountVisibleElements (Listing 7) computes the number of list elements that should be displayed.


Now that we have a visible list, we're ready to let the user manipulate the hierarchy by clicking the triangular buttons. When the user presses the mouse button, the application decides whether the cursor is in one of its windows and whether this window might just happen to have a twist-down list. If so, the application calls DoTwistDownClick with the list handle, a pointer to an event record, and a pointer to a Cell structure that identifies the selected cell on exit. DoTwistDownClick returns one of five action states, as shown in Table 1.

Listing 7. CountVisibleElements

short CountVisibleElements(TwistDownHandle twistDownHandle)
    short       result;

    result = 0;
    while (twistDownHandle != NULL) {
        if (TestTDFlag(twistDownHandle, kShowSublist))
            result += 
    return (result);

Table 1
DoTwistDownClick action states

Action StateMeaning
kTwistDownNotInListThe mouse-down event was not in the list area. Your application should handle this event.
kTwistDownNoClickThe user pressed the mouse button in a triangular button but released it outside the button. Your application should ignore this click.
kTwistDownButtonClickThe mouse click was in the triangular button. DoTwistDownClick has handled this, but your application may need to do further processing.
kTwistDownClickThe user clicked, once, on list data. Your application may need to do further processing.
kTwistDownDoubleClick The user double-clicked on list data. Your application may need to do further processing.

The techniques described here for handling mouse events can be used to create lists whose cells contain other kinds of active elements, such as buttons or checkboxes . *

DoTwistDownClick, together with the subroutines it calls, hides a fairly complex process consisting of the following steps; these steps are described further in the following sections and illustrated in the simplified version of DoTwistClick shown in Listing 8.

  1. Check that the mouse-down event is in the list area.
  2. Check that the user pressed a triangular button.
  3. Track the mouse while it's held down.
  4. Take appropriate action when the mouse button is released.

Did the user press in the list rectangle?Get the mouse location in local coordinates and the window rectangle that contains the list and its scroll bar. If the mouse location is not in the list, just return.

Did the user press a triangular button?The user pressed in the list area; is it in a button? The code sample on the CD has a test for left or right alignment (so that you can use the function with Arabic or Hebrew script systems) but that test is ignored here. The central algorithm determines the rectangle that encloses all the cell buttons. If the cursor is in that area, it then checks whether there is a cell under the cursor and, if so, whether this cell actually displays a button.

Track the mouse while it's in the button area.If we get past all that, we know that the user pressed a triangular button. The click-handler sets and clears flag bits that the LDEF references when redrawing the list cell. The LDEF starts by drawing the button in its active (filled) state. Note that each call to LDraw redraws the list cell -- but, as pointed out earlier, the kOnlyRedrawButton flag prevents the entire display line from blinking.

The sequence beginning with "if (StillDown ())" in the code shows how you can track your own visual elements, such as icons, as if they were normal buttons. You can also use this technique to add checkboxes or other button-like objects to list cells.

The user released the mouse button.When the user releases the mouse button in the triangular button area, the application changes the button state (for example, from [IMAGE 058-078_Minow_REV14.GIF] to [IMAGE 058-078_Minow_REV15.GIF] ). This is a two-step process that briefly flashes an intermediate button ( [IMAGE 058-078_Minow_REV16.GIF] ) to give the user the illusion of change. While your application would certainly work without this subtle touch, it wouldn't look as good. Call theExpandOrCollapseTwistDownList function after flashing the intermediate button to redraw the button in its new state. Note that kEraseButtonArea is set so that the intermediate button is drawn properly.

Listing 8. DoTwistDownClick

    DoTwistDownClick(ListHandle          theList,
                     const EventRecord   *eventRecordPtr,
                     Cell                *selectedListCell)
    Cell             theCell;      /* Current list cell            */
    Rect             hitRect;      /* The button area in this cell */
    Boolean          inHitRect;    /* Cursor is in the button area */
    Boolean          newInHitRect; /* Cursor moved into the button */
    short            cellHeight;   /* Height of a list cell        */
    short            visibleTop;   /* Top pixel in the list area   */
    TwistDownHandle  twistDownHandle;/* Current twist-down element */
    TwistDownPrivateHandle  privateHandle;  /* Private data        */
    Point            mousePt;      /* Where the mouse is located   */
    TwistDownClickState  result;   /* Function result              */
    long             finalTicks;   /* For the Delay function       */

    /*** 1. Did the user press in the list rectangle?              */
    mousePt = eventRecordPtr->where;
    GlobalToLocal(&mousePt);     /* Mouse in local coordinates */
    hitRect = (**theList).rView;           /* Here's the list area */
    hitRect.right += kScrollBarWidth;/* Include the scroll bar, too*/
    if (PtInRect(mousePt, &hitRect) == FALSE) {
        result = kTwistDownNotInList;
        return (result);

    /*** 2. Did the user press a triangular button?                */
    privateHdl = (TwistDownPrivateHandle) (**theList).userHandle;
    hitRect.right = (**theList).rView.left + (**theList).indent.h
                        + (**privateHdl).triangleWidth;
    inHitRect = FALSE;
    if (PtInRect(mousePt, &hitRect)) {
        /*** The mouse is in the button area; is there a cell?     */
        cellHeight = (**theList).cellSize.v;
        theCell.h = 0;
        theCell.v = ((mousePt.v - (**theList) / cellHeight
                    + (**theList);
        /*** This is a list cell that should have data. Get the    */
        /*** twistdown element handle. If there's no data, or no   */
        /*** hierarchy, the click will be ignored.                 */
        twistDownHandle = GetTwistDownElementHandle(theList, theCell);
        if ((twistDownHandle != NULL)
         && TestTDFlag(twistDownHandle, kHasTwistDown))
            inHitRect = TRUE;
    if (inHitRect == FALSE) {
        /*** There's no button here, or the user didn't click it.  */
        /*** Just call the normal list click-handler and return    */
        /*** its value.  This is needed to handle scroll bars      */
        /*** correctly.                                            */
        if (LClick(mousePt, eventRecordPtr->modifiers, theList))
            return (kTwistDownDoubleClick);
        else {
            return (kTwistDownClick);

    /*** 3. Track the mouse while it's in the button area.         */
        kDrawButtonFilled | kOnlyRedrawButton);
    LDraw(theCell, theList);
    /*** Set hitRect to the triangular button dimensions.          */ = (theCell.v - (**theList) * cellHeight
                    + (**theList);
    hitRect.bottom = + cellHeight;
    /*** Track the mouse while it's still down: if it moves into   */
    /*** the rectangle, redraw it filled; if it moves out, redraw  */
    /*** it unfilled.                                              */
    if (StillDown()) {
        while (WaitMouseUp()) {
            newInHitRect = PtInRect(mousePt, &hitRect);
            if (newInHitRect != inHitRect) {
                /*** The cursor moved into or out of the triangle. */
                InvertTDFlag(twistDownHandle, kDrawButtonFilled);
                LDraw(theCell, theList);
                inHitRect = newInHitRect;
    /*** 4. The user released the mouse button.                    */
    if (inHitRect == FALSE) {
        /*** The user canceled the operation by releasing the      */
        /*** mouse outside the triangular button area.             */
        /*** drawButtonFilled will normally be clear. It can be    */
        /*** set, however, if the user clicks so briefly that the  */
        /*** StillDown() test above is FALSE                       */
        if (TestTDFlag(twistDownHandle, kDrawButtonFilled)) {
            ClearTDFlag(twistDownHandle), kDrawButtonFilled);
            LDraw(theCell, theList);
        ClearTDFlag(twistDownHandle), kOnlyRedrawButton);
        return (kTwistDownNoClick);
        (kDrawIntermediate | kEraseButtonArea));
    LDraw(theCell, theList);
    Delay(kAnimationDelay, &finalTicks);
        (kDrawIntermediate | kDrawButtonFilled | kEraseButtonArea));
    ExpandOrCollapseTwistDownList(theList, theCell);
    *selectedListCell = theCell;
    ClearTDFlag(twistDownHandle, kOnlyRedrawButton);
    return (kTwistDownButtonClick);

ExpandOrCollapseTwistDownList (Listing 9) is normally called directly by DoTwistDownClick, as shown in the preceding section. It can also be called directly by the application. When called, it inverts the "expansion" state of the designated list cell, redraws the triangular button, and calls BuildVisibleList (described earlier in "Creating the Visible Display") to revise the visible hierarchy. Note that BuildVisibleList will modify the display starting with the current cell: the cells above will not change and thus need not be modified or redrawn.


When the contents of a list cell change or the display requires updating, the List Manager calls the TwistDownLDEF function. This function draws the button in its current state and either draws the list cell (for simple text cells) or calls a user-defined drawing function to draw more complex cells. The code is generally straightforward (again, ignoring right or left considerations). Basically, it examines the state of the kOnlyRedrawButton flag and proceeds as follows: * If the flag is set, "shrink" the display rectangle so that only the button is redrawn. Choose the correct triangular polygon and draw it in its proper state. * If the flag is clear, draw the cell data and the triangular polygon.

Let's look more closely at the TwistDownLDEF drawing code (Listing 10):

  1. First we determine what to draw. To begin drawing the list, we first need the cell content. This is the handle that contains the list element. We also check that userHandle has been set up correctly. Note that we don't use the List Manager's LFind function because the data might not be aligned in the list cell storage. (Actually, the data is aligned, because only handles are stored in the cells, but it doesn't hurt to be suspicious.) If the handle contains a list element, the values of the flags determine what to draw.
  2. Next, we call DrawTriangle to draw the triangular button. The value of theFlag determines the button state and its location.
  3. Finally, after checking to be sure kOnlyRedrawButton is not set and that we have the data, TwistDownLDEF redraws the cell data with the proper indentations. Here's where the code allows you to specify a user-defined drawing function.

Listing 9. ExpandOrCollapseTwistDownList

twistDownHandle = GetTwistDownElementHandle(theList, theCell);
if ((twistDownHandle != NULL)
 && TestTDFlag(twistDownHandle, kHasTwistDown)) {
    InvertTDFlag(twistDownHandle, kShowSublist);
    /*** Redraw the triangular button in its new state.            */
    ClearTDFlag(twistDownHandle, kDrawButtonFilled);
        (kOnlyRedrawButton | kEraseButtonArea));
    LDraw(theCell, theList);
        (kOnlyRedrawButton | kEraseButtonArea));
    /*** If some other part of the list will change, rebuild the   */
    /*** List Manager cells and redraw the list.                   */
    if ((**twistDownHandle).subElement != NULL)
        BuildVisibleList(theList, theCell.v);

Listing 10. TwistDownLDEF drawing code

pascal void TwistDownLDEF(
        short               listMessage,
        Boolean             listSelect,
        Rect                *listRect,
        Cell                listCell,           /* Unused          */
        short               listDataOffset,     /* Unused          */
        short               listDataLen,
        ListHandle          theList
    short           indent;           /* Cell data indentation     */
    TwistDownHandle twistDownHandle;  /* The cell data             */
    TwistDownPtr    twistDownPtr;     /* Cell data (locked handle) */
    short           cellSize;         /* sizeof(TwistDownHandle)   */
    PolyHandle      polyHandle;       /* Button polygon            */
    Point           polyPoint;        /* Where to draw the button  */
    Rect            viewRect;         /* Actual cell drawing area  */
    signed char     elementLockState; /* twistDownHandle lock state*/

    #define TestFlag(flagBit) ((theFlag & (flagBit)) != 0)

    . . . /*** Other LDEF processing isn't shown.                  */

    /*** 1. Determine what to draw.                                */
    cellSize = sizeof twistDownHandle;
    LGetCell(&twistDownHandle, &cellSize, listCell, theList);
    if ((cellSize == sizeof twistDownHandle)
         && twistDownHandle != NULL) {
        /*** There is a list element. (This if statement extends   */
        /*** all the way to the end of the sequence.) Lock the     */
        /*** element in memory and look at the flag values. Set    */
        /*** viewRect to the part of the List Manager cell that    */
        /*** will be drawn.                                        */
        elementLockState = HGetState((Handle) twistDownHandle);
        HLock((Handle) twistDownHandle);
        twistDownPtr = (*twistDownHandle);
        privateHdl = (TwistDownPrivateHandle) (**theList).userHandle;
        viewRect = *listRect;
        theFlag = (*twistDownPtr).flag;
        if (TestFlag(kOnlyRedrawButton)) { 
            /*** Shrink the display area when only the button is   */
            /*** redrawn.                                          */
            viewRect.right = viewRect.left + (**theList).indent.h
                                + (**privateHdl).triangleWidth;
        if (TestFlag(kOnlyRedrawButton) == FALSE 
         || TestFlag(kEraseButtonArea))

        /*** 2. Draw the triangular button.                        */ 
        if (TestFlag(kHasTwistDown)) {
            polyPoint.v = listRect->top + 1;
            polyPoint.h = listRect->left + (**theList).indent.h
                            + kTriangleOutsideGap;
            if (TestFlag(kDrawIntermediate))
                polyHandle = (**privateHdl).intermediateTriangle;
            else if (TestFlag(kShowSublist))
                polyHandle = (**privateHdl).openTriangle;
                polyHandle = (**privateHdl).closedTriangle;
            DrawTriangle(polyHandle, polyPoint,
                         theFlag & kDrawButtonFilled);
        /*** 3. Draw the cell data.                                */
        if (TestFlag(kOnlyRedrawButton) == FALSE
         && (*twistDownPtr).dataLength > 0) {
            /*** Indent the text to show the depth of the          */
            /*** hierarchy. Then build a display rectangle for the */
            /*** cell text and set the pen to the leftmost         */
            /*** position of the text.                             */
            indent = (**theList).indent.h
                    + (**privateHdl).triangleWidth
                    + ((**privateHdl).tabIndent
                       * (*twistDownPtr).indentLevel);
            viewRect = *listRect;
            viewRect.left += indent;
            /*** If the user didn't provide a drawing procedure,   */
            /*** draw a text string. Otherwise, call the user's    */
            /*** procedure.                                        */
            if ((**privateHdl).drawProc == NULL) {
                    + (**theList).indent.v);
                DrawText((*twistDownPtr).data, 0,
            else {
                /* Call user's drawing function */
                  theList,                     /* The list handle  */
                  (const Ptr) (*twistDownPtr).data,/* Data to draw */
                  (*twistDownPtr).dataLength,  /* Size of the data */
                  &viewRect);              /* Where to draw it */
        }                            /* If we're drawing cell data */
        HSetState((Handle) twistDownHandle, elementLockState);
    }                                      /* If we have cell data */

If you look closely at the triangular buttons on a color or grayscale display, you'll notice that the button is filled with a grayish background color. (The Finder uses the color the user assigned to the file, while we use a light gray color.) The DrawTriangle function called by TwistDownLDEF takes three parameters: the polygon, where it's to be drawn, and a Boolean that specifies whether the user is currently pressing the triangular button. DrawTriangle uses the DeviceLoop procedure, DrawThisTriangle, which calls the actual drawing function for each type of device so that drawing can be optimized for different screen depths. (See Listing 11.)

The DeviceLoop procedure is described in "DeviceLoop Meets the Interface Designer," develop  Issue 13, and in Inside Macintosh  Volume VI.*


The sample program illustrates how you can use twist-down lists to display a directory of all files on a volume. It's a very simple program and you would be well advised not to use it on a huge disk with many folders and files, because there's no protection against storage overflow.

The sample program compiles and runs in five environments: THINK C 6.0, Metrowerks DR1, and MPW 3.2 for the 680x0-based Macintosh; and, for the Power Macintosh, Metrowerks DR1 and the MPW provided in the Macintosh on RISC Software Developer's Kit. Converting the code for Power Macintosh took about one day (it was my lab exercise when I took the Apple Developer University "PowerPC BootCamp" course). To learn more about what I did to accomplish this conversion, see "Converting for Power Macintosh."

When you start up the sample program, it begins enumerating the disk; you can click to stop it at any time. The hierarchical list is built using the algorithm illustrated bythe MyBuildHierarchy function, described in the section "Putting Data Into the List."

Listing 11. DrawTriangle and DrawThisTriangle

typedef struct      TriangleInfo {   /* Passed to DrawThisTriangle */
    PolyHandle      polyHandle;      /* The polygon to draw        */
    Point           polyPoint;       /* Where to draw it         */
} TriangleInfo, *TriangleInfoPtr;

static void DrawTriangle(PolyHandle   polyHandle,
                         Point        polyPoint,
                         Boolean      isSelected
    TriangleInfo        triangleInfo;
    RgnHandle           drawingRgn;
    long                savedA5;

    /*** Refresh A5 so that we can use the current QuickDraw       */
    /*** globals.                                                  */
    savedA5 = SetCurrentA5();
    triangleInfo.polyHandle = polyHandle;      /* Save our drawing */
    triangleInfo.polyPoint = polyPoint;        /*  parameters.     */
    /*** Position the polygon properly on the display.             */
    OffsetPoly(polyHandle, polyPoint.h, polyPoint.v);
    if (isSelected)
        FillPoly(polyHandle, &;
    else {
        /*** Get drawing region and call DeviceLoop to do the work */
        drawingRgn = NewRgn();
            drawingRgn,              /* Region to draw into        */
            (DeviceLoopDrawingProcPtr) DrawThisTriangle,
            (long) &triangleInfo,       /* Drawing parameters  */
            0                        /* DeviceLoop flags (ignored) */
    /*** Frame the button in black and move the polygon back to    */
    /*** its default [0,0] position.                               */
    OffsetPoly(polyHandle, -polyPoint.h, -polyPoint.v);
static pascal void DrawThisTriangle(      /* Called by DeviceLoop  */
        short            depth,           /* Screen pixel depth    */
        short            deviceFlags,     /* Device info (ignored) */
        GDHandle         targetDevice,    /* The display (ignored) */
        TriangleInfoPtr  triangleInfoPtr  /* The data to be drawn  */
    RGBColor                    foreColor;
    RGBColor                    saveForeColor;
    RGBColor                    backColor;
    short                       i;
    Rect                        polyRect;

    polyRect = (**(*triangleInfoPtr).polyHandle).polyBBox;
    LocalToGlobal(& ((Point *) &polyRect)[0]);
    LocalToGlobal(& ((Point *) &polyRect)[1]);
    if (depth > 1) {
        /*** Drawing in color or grays: fill the triangle with a   */
        /*** very light gray.                                      */
        saveForeColor = foreColor;
        /*** This loop sets foreColor to a very light gray.        */
        for (i = 0; i < 8; i++) {
            if (GetGray(GetGDevice(), &backColor,
                    &foreColor) == FALSE)
        FillPoly((*triangleInfoPtr).polyHandle, &;
    else {
        /*** Monochrome: erase the interior of the polygon.        */


Here's a simplified checklist of the kinds of things you'll need to do to convert code for the Power Macintosh, based on what I did to convert my program (see the sample code on the CD, especially TwistDownList.c). I borrowed heavily from the document "Moving Your Source to PowerPC" on the Macintosh on RISC Software Developer's Kit CD.
  • Convert to standard C using the most restrictive environment so that the application runs correctly in THINK C and MPW with no compiler or linker errors or warnings. In THINK C, for example, you would enable the Check Pointer Types and Require Prototypes options and remove the MacHeaders option. In all cases, you should add prototypes and explicit function return types and fix potential trigraph problems.
  • Replace all instances of int and unsigned by explicit short and long declarations. Be very careful about structure definitions that are shared among code modules (or written to files or resources), as the Power Macintosh aligns structures differently from the 680x0-based Macintosh: you may need to add #pragma statements to override the compiler.
  • Create a makefile for the MPW development system. Try to build "fat binaries" that will run native on both the 680x0-based Macintosh and Power Macintosh.
  • If at all possible, convert to the universal interfaces provided in the Software Developer's Kit (and on this issue's CD). In particular, ProcPtr references must be converted to UniversalProcPtr. Also, all low-memory references must be replaced by the access functions provided as part of the universal interfaces.
  • Isolate system and compiler dependencies by using #ifdef statements. For MPW-based compilers, add -d MPW=1 to your makefiles. This lets you add compiler- and system-dependent #pragmas and code sequences without encountering compiler warnings.

#ifdef THINK_C /* THINK C */
#ifdef __powerc /* Power Macintosh */
#ifdef MPW /* MPW: see above */
#ifdef applec /* Apple compilers */
  • Remove or isolate all assembly language and inline statements. You can probably eliminate all assembly language from your Power Macintosh applications.
  • Power Macintosh will not support a number of obsolete system traps; when you convert your program, you may need to rewrite small sections of your code. Of course, you should check new code on both the 680x0-based Macintosh and Power Macintosh.
  • Applications must explicitly allocate space for the QuickDraw globals. Add the following to your application's main program file:

 #ifdef __powerc
  • Avoid storing application-specific data in your application's data fork: the Power Macintosh stores its code there. (You can reserve a fixed amount of space at the beginning of the data fork, if necessary.)
  • Add a 'cfrg' (code fragment) resource to your application's resource fork. This tells the Process Manager that you've built a Power Macintosh native application.

 #ifdef __powerc
#include "CodeFragmentTypes.r"
resource 'cfrg' (0) {
        kNoVersionNum, kNoVersionNum,
        0, 0,
        kIsApp, kOnDiskFlat,
        kZeroOffset, kWholeFork,
  • Make good use of the compatibility built into the Power Macintosh: your application should run native on Power Macintosh and still run correctly on a 680x0-based machine. The user shouldn't notice any difference.
  • In most cases, native Power Macintosh applications will be about the same size as their 680x0 counterparts. Of course, if you use the compatible "fat binary" capability, the application file size will increase.

The above list isn't complete by any means, but, together with the sample code, it should get you started. Also, there are several Developer University courses available to help bring you up to speed quickly.


So, what's this method of displaying data good for? If you have data that's hierarchical, coherent, line-oriented, and not too large, you'll find that the twist-down list functions are both useful and easy to incorporate into your applications. * Hierarchical. If the data doesn't separate into a strict hierarchy, the presence of triangular buttons will only confuse your users: they're expecting your application to operate like the Finder. Also, if the hierarchy is very limited (a single topic with a block of text), you'll probably find some other solution easier to use.
  • Coherent. Your users expect consistency between the parent "title" and child "content" data. Try another technique if clicking a triangular button does something other than reveal a lower-level hierarchy. For example, the JMP statistical package uses standard Macintosh buttons to expand a hierarchy. Clicking a button may reveal a table of data or a graphical element. (JMP hierarchies are also quite shallow.)
  • Line-oriented. Again, the user is expecting Finder-like behavior. If the data is not line-oriented, you'll discover that coaxing the List Manager to deal with your data isn't worth the considerable effort it takes. In particular, avoid varying the height of each line as this makes the triangular buttons look weird (some small, some large) unless you normalize their size.
  • Not too large. This is a restriction of the List Manager. Because of the way it stores data, there's an absolute limit of 32,767 cells in a list, but it becomes very slow and clumsy with more than a few hundred cells.

I wrote the TwistDown library because I wanted to display an AOCE catalog specification that can contain many internal components of varying size and complexity. It offered a friendly interface into a structure that is convoluted, warped, and -- indeed -- twisted.


  • "Standalone Code on PowerPC" by Tim Nichols, develop  Issue 17.
  • "Making the Leap to PowerPC" by Dave Radcliffe, develop   Issue 16.
  • Inside Macintosh: More Macintosh Toolbox  (Addison-Wesley, 1993), Chapter 4, "List Manager," or Inside Macintosh  Volume IV (Addison-Wesley, 1986), Chapter 30, "The List Manager Package."
  • "DeviceLoop Meets the Interface Designer" by John Powers, develop  Issue 13. DeviceLoop is also described in Inside Macintosh  Volume VI (Addison-Wesley, 1991) on page 21-23.

MARTIN MINOW (AppleLink MINOW, Internet is an aged, wrinkled hacker who, having determined that it's far too late to whine about his receding hairline, instead takes perverse delight in informing his young colleagues at excessive length how much better programming was when you had to punch out your programs, one machine word after another, on oily paper tape, back in the good old days when hex digits were KSNJFL, words were 40 bits long, and a supercomputer had 1024 of them. In real life, he works at Apple's Developer Support Center, drinks beer, and runs marathons.*

ACKNOWLEDGMENTS The TwistDown library is generally based on code from the NewsWatcher application by Steve Falkenburg. Steve's code is based on code written by John Norstad, author of Disinfectant. *

Thanks to our technical reviewers Jon Callas, Godfrey DiGiorgi, Steve Falkenburg, Dave Radcliffe, and Dean Yu. And thanks to Richard Clark for the PowerPC BootCamp course. *


Community Search:
MacTech Search:

Software Updates via MacUpdate

iShowU Instant 1.3.2 - Full-featured scr...
iShowU Instant gives you real-time screen recording like you've never seen before! It is the fastest, most feature-filled real-time screen capture tool from shinywhitebox yet. All of the features you... Read more
NeoFinder 7.5.1 - Catalog your external...
NeoFinder (formerly CDFinder) rapidly organizes your data, either on external or internal disks, or any other volumes. It catalogs and manages all your data, so you stay in control of your data... Read more
App Tamer 2.5 - Efficiently manage your...
App Tamer tames your processor-monopolizing apps and keeps them from chewing up excessive CPU time and battery life. Powered by a unique AutoStop feature, App Tamer stops each application when you... Read more
MainStage 3 3.4.4 - Live performance too...
Apple MainStage makes it easy to bring to the stage all the same instruments and effects that you love in your recording. Everything from the Sound Library and Smart Controls you're familiar with... Read more
iTubeDownloader 6.5.13 - Easily download...
iTubeDownloader is a powerful-yet-simple YouTube downloader for the masses. Because it contains a proprietary browser, you can browse YouTube like you normally would. When you see something you want... Read more
FileZilla 3.47.0 - Fast and reliable FTP...
FileZilla (ported from Windows) is a fast and reliable FTP client and server with lots of useful features and an intuitive interface. Version 3.47.0: Fixed regression loading advanced site... Read more
Transmit 5.6.3 - Excellent FTP/SFTP clie...
Transmit is an excellent FTP (file transfer protocol), SFTP, S3 ( file hosting) and iDisk/WebDAV client that allows you to upload, download, and delete files over the internet. With the... Read more
Doomsday 2.2.2 - Play classic Doom on mo...
id Software's Doom pioneered the modern first-person shooter genre. Released in 1993, it was a quantum leap in game engine technology with fluid and - at the time - incredibly realistic 3D graphics.... Read more
Ableton Live 10.1.9 - Record music using...
Ableton Live lets you create and record music on your Mac. Use digital instruments, pre-recorded sounds, and sampled loops to arrange, produce, and perform your music like never before. Ableton Live... Read more
Maintenance 2.6.5 - System maintenance u...
Maintenance is a system maintenance and cleaning utility. It allows you to run miscellaneous tasks of system maintenance: Check the the structure of the disk Repair permissions Run periodic scripts... Read more

Latest Forum Discussions

See All

Creepy Little Monsters is a cute, monste...
Creepy Little Monsters is a retro throwback that sees you traversing tricky puzzle-platformer levels as a one-eyed monster. It aims to offer a fresh take on 80s and 90s classics of the genre, and it's out right now for iOS and Android. [Read more... | Read more »
Tyrant's Arena delivers intense her...
Tyrant's Arena is an intense midcore multiplayer actioner where you'll compete in tricky 3v3 matches to crush your opponents and earn neat rewards. It comes to us from developer Kroy Games, and it's now available for pre-registration on iOS and... | Read more »
Mobile Games Starter Kit
Over here at 148Apps, we regularly dive deep into the latest and greatest mobile games hitting the App Store, but that’s not always what people are looking for when searching for a new mobile game. Some folks just want to dip their toes into... | Read more »
Unresolved is a hard-hitting narrative a...
Ghofran Akil's Unresolved in an upcoming text-based adventure game that sees you playing as a mother attempting to find her disappeared husband during the Lebanese Civil War. [Read more] | Read more »
Marvel Strike Force introduces new brawl...
FoxNext's squad-based RPG Marvel Strike Force is set to receive some fresh characters from the X-Men and Iron Man series. They'll arrive as part of the game's latest update, which follows a sizable spending boycott on the title due to complaints... | Read more »
Speed Dating for Ghosts is a narrative a...
Speed Dating for Ghosts originally released on Steam back 2018, since then it has received honourable mentions for narrative during the Independent Games Festival. Now it's made its way over to iOS devices where it's available as a premium title... | Read more »
Fast-paced multiplayer title Tennis Star...
Tennis Stars: Ultimate Clash is the latest free-to-play tennis title to hit iOS and Android. It's said to be a fairly casual experience, offering easy-to-learn controls and fast-paced, mobile-friendly matches. [Read more] | Read more »
Super Mecha Champions' latest updat...
Super Mecha Champions' latest update sees the addition of a brand new character called R.E.D. Alongside that, there's news about the current season and a series of Emojis that have been added to the game. [Read more] | Read more »
Apple Arcade: Ranked - Top 50 [Updated 2...
In case you missed it, I am on a quest to rank every Apple Arcade game there is. [Read more] | Read more »
Apple Arcade: Ranked - 51+ [Updated 2.19...
This is part 2 of our Apple Arcade Ranking list. To see part 1, go here. To skip to part 3, click here. 51. Mini Motorways Description: [Read more] | Read more »

Price Scanner via

B&H is again offering $100 discounts on M...
B&H Photo has 4-Core and 6-Core Mac minis on sale for $100 off Apple’s standard MSRP, with prices starting at only $699. Overnight shipping is free to many US addresses: – 3.6GHz Quad-Core mini... Read more
B&H Photo drops iMac prices, offers model...
B&H Photo has new 2019 21″ and 27″ 5K iMacs in stock today and on sale for up to $250 off Apple’s MSRP, with prices starting at only $999. These are the same iMacs sold by Apple in their retail... Read more
Flash sale! 11″ 64GB WiFi iPad Pro for $674,...
Walmart has the 11″ 64GB WiFi iPad Pro on sale on their online store today for $674. That’s $125 off Apple’s MSRP for this model and the cheapest price available from any Apple reseller. Choose free... Read more
Sale! Get the 256GB 13″ Silver MacBook Air fo...
Amazon has new 2019 13″ 1.6GHz/256GB MacBook Airs, in Silver, on sale today for only $999 shipped. Their price is $300 off Apple’s MSRP for this model, and it’s the cheapest price for a 256GB MacBook... Read more
Verizon offers free iPhone 7 to customers ope...
Verizon is offering a free 32GB iPhone 7 for new or existing customers who open a new line of service, no trade-in required. Cost of the phone is credited to your account monthly over 24 months. The... Read more
Sale! 10.5″ 256GB WiFi iPad Air for $549, $10...
Amazon has new 10.5″ 256GB WiFi iPad Airs, in Space Gray, on sale today for $549 shipped. Their price is $100 off Apple’s MSRP for this model, and it’s the cheapest price available from any Apple... Read more
Back on sale! Apple’s new Mac Pro for $5499,...
B&H Photo has the base 2019 Mac Pro (3.5GHz 8-Core Xeon, 32GB RAM, 256GB SSD) in stock today and on sale for $5499 including free overnight delivery to many addresses in the US. Their price is $... Read more
B&H offers $100 discount on base 13″ 1.4G...
B&H Photo has new 2019 13″ 1.4GHz MacBook Pros on sale for $100 off Apple’s MSRP today with prices starting at $1199. Overnight shipping is free to many addresses in the US. These are the same... Read more
Apple continues to offer Certified Refurbishe...
Apple has Certified Refurbished iPhone XS models available for up to $350 off MSRP, with prices starting at $699. Each iPhone is unlocked and comes with Apple’s standard one-year warranty and a new... Read more
Apple AirPods are on sale for $30 off today
Amazon has new 2019 Apple AirPods (non-Pro models) on sale today for $30 off MSRP, starting at $129. Shipping is free: – AirPods with Wireless Charging Case: $169 $30 off MSRP – AirPods with Charging... Read more

Jobs Board

Medical Assistant - *Apple* Valley Clinic -...
…professional, quality care to patients in the ambulatory setting at the M Health Fairview Apple Valley Clinic, located in Apple Valley, MN. Join the **M Health Read more
Geek Squad Advanced Repair *Apple* Professi...
**764652BR** **Job Title:** Geek Squad Advanced Repair Apple Professional **Job Category:** Store Associates **Store NUmber or Department:** 000245- Apple Read more
Medical Assistant - *Apple* Valley Clinic -...
…professional, quality care to patients in the ambulatory setting at the M Health Fairview Apple Valley Clinic, located in Apple Valley, MN. Join the **M Health Read more
Windows/ *Apple* Technical Support Engineer...
Windows/ Apple Technical Support Engineer McLean , VA , US Apply + Be you + Be Booz Allen + Be empowered + Learn More Job Description Location: McLean, VA, US Job Read more
Medical Assistant - *Apple* Valley Clinic -...
…professional, quality care to patients in the ambulatory setting at the M Health Fairview Apple Valley Clinic, located in Apple Valley, MN. Join the **M Health Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.