Adding a part
You can add a part to any category on the parts palette.
In the Composition Editor, select Modify Palette > Add New Part from the Options menu.
The Add to Palette window is displayed:
Add to Palette window
To add your part to the parts palette, type Runner in the Part Name text-entry field, or the class name of the part you want to add. Next, select Athletes in the Category list, or the name of the category to which you want to add your part. Finally, select OK.
Your part is added to the parts palette in the specified category.
Notice that the part you just added uses Default part icon, the default part icon.
Because we want a unique icon for this part, remove the icon you just added from the parts palette. See Deleting a category or part.
To give your part a unique icon, create an abtInstanceGraphicsDescriptor class method for the part, similar to the following:
abtInstanceGraphicsDescriptor
"Answers the icon for this part."
^(AbtIconDescriptor new
moduleName: 'userpal';
id: 801)
 
Note:
Be sure to add this as a class method and not an instance method.
When you have saved the method, repeat the steps described previously to add this part to the parts palette. Now your part displays with your own icon on the parts palette. Look at your part in the Organizer window. Your part is displayed with its own icon.
Open the Composition Editor on a part and select the category you selected when adding the part. You will see the icon you specified for your part in the parts palette.
Last modified date: 07/16/2020