The first step is to create a new widget class. Create this new class in your runtime application, MyRunSamplePartsApp:
Your class definition should look like the following:
CwDrawingArea subclass: #MyCwShape instanceVariableNames: '' classVariableNames: '' poolDictionaries: ''
You create a link between the shape part and the shape widget by overriding the cwWidgetClass class method in MyShape. Implement the following class method in MyShape.
cwWidgetClass "Answer the widget for this part" ^MyCwShape
Now that the widget class is defined, you're ready to write its Smalltalk code.