How to make Pop-Up Menus in Custom Quartz Composer Patches

screenshot of a custom Quartz Composer patch's pop-up menuMaking pop-up menus in custom Quartz Composer patches is actually surprisingly easy.

This release is only compatible with Tiger (10.4).
Please see for Leopard-specific informations.
  1. Set up a QCIndexPort input. QCIndexPorts provide values from 0 to whatever max you specify using - (void)setMaxIndexValue:(unsigned int)max;.
@interface IndexPortPopUpDemoPatch : QCPatch
    QCIndexPort *inputPerson;


  1. Add the “menu” key to the port’s input attributes:
                <string>Arthur Dent</string>
                <string>Ford Prefect</string>
                <string>Zaphod Beeblebrox</string>
                <string>Wonko the Sane</string>
  1. Make sure you set the max index value in the initWithIdentifier function:
- (id)initWithIdentifier:(id)fp8
        id z=[super initWithIdentifier:fp8];

        [inputPerson setMaxIndexValue:7];

        return z;
  1. Read the value out of the QCIndexPort using - (unsigned int)indexValue;.

Steve Mokris is a developer at Kosada, Inc.