Installation

  • Make global names for the prototypes.

  • Set the creator path for the prototypes and the traits.

  • Edit the prototype slots in the prototypes.

  • Make each prototype a copy-down of circleMorph.

  • Set module information for the slots in globals, the prototypes and the traits.

  • Save the module.

  • Add a morph to the factory.

Installation

We can now install our objects in the global namespace, make a module, and save it.

First, we open globals so that the category ui2/Applications is exposed. We can then drag the slot pieWedgeMorph from the chart prototype and drop it in. Then we can add a slot pieChartMorph, and connect it to the chart.

Next, we use `Make creator' on these slots, and on the parent slots in the prototypes.

After that, we edit the prototype slots in the objects to refer to the correct slots (namely pieChartMorph and pieWedgeMorph).

Our prototypes are copies of circleMorphs, and should maintain their structure in the face of changes to circleMorph. Hence, we make each of them a copy-down of circleMorph. Omit the slots parent and prototype when setting the copy-down information.

Finally, we can add module information into the new slots in globals, the prototypes and the traits, placing all of them in a module pieChart. At this point, we can file out the module.

You may even consider embedding a pie chart into the factory.

[ Previous ] [ Index ] [ Next ]