You’ll revise the MacEngraving composition provided with Mac OS X v10.5 so that it has two published input ports at the root macro patch level—one that controls the clear color and the other that controls the text shown on the computer.
Open the MacEngraving composition located in Developer/Examples/Quartz Compositions/Interface Builder.
Notice that the "Text" input port of the Image With String patch is gray, to indicate that this port is already published.
Control-click the Clear Color input port on the Clear patch and choose Published Inputs > Clear Color. Then press Return.
Notice that the Clear Color input port appears gray to indicate that it is published.
In the Viewer window, click Input Parameters.
The Text and Clear Color input ports appear as a sheet in the Viewer window. When you change the text and the clear color, you immediately see the results in the View window.
Click the workspace to make sure that no patches are selected. Then open the Inspector to the Published Inputs & Outputs pane.
You should see the Text and Clear Color input port names and the key assigned to each. The key for the Text input port is text. The key for the Clear Color input port is Clear_Color. Make note of these, because you must use these keys in Interface Builder to set up the bindings. The keys you supply in Interface Builder must match exactly what you see in this pane; keys are case-sensitive.

Save the composition and quit Quartz Composer.
Last updated: 2007-07-11