User's Guide

Adding parts to the palette

When you first tested your timer part, you added it to the free-form surface by selecting Add Part from the Options menu. It's easier to add parts by selecting them from the parts palette, so you might want to add your timer part to the palette. This can be done in several different ways:

The preceding method is not called automatically unless the parts palette is rebuilt, so you must execute it from the Transcript window to make the part visible on the palette. In the Transcript window type:

MyTimer addPartsToCatalog

Then select the text and select Execute from the Transcript's pop-up menu.

The addPartsToCatalog method adds the part to the Models category, but you could change the code to add it to any category. To learn more about adding parts to categories and creating your own categories, see Loaded method examples.

Tip icon
Each category in the parts palette has a translatable name and an untranslated name. To locate a category, as you did in addPartsToCatalog you must use the untranslated name. To see a list of the available untranslated category names, inspect the following code snippet in a Workspace:
AbtPartsCatalog current catalog keys

To view the corresponding translated category names, inspect the following code snippet in a workspace:

AbtPartsCatalog current catalog values
        collect: [:each | each displayName]


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]