您好,所以我有一个绘制圆形和矩形的主应用程序,但是当我点击离开时,它们就消失了,这是我使用的代码
initialize
shapesView := ShapesView new.
shapesModel := ShapesModel new.
shapesView model: shapesModel.
我有组件初始化
postOpenWith: aBuilder
shapesView initializeComponents.
在 ShapesView 类中我有一个模型访问器和这个方法,我的模型和控制器仍然是空的
initializeComponents
| shape gc|
gc := self graphicsContext.
gc paint: ColorValue red.
shape := MyRectangle origin: 2@2 extent: 50@75.
shape displayFilledOn: gc.
gc paint: ColorValue blue.
shape := MyCircle center: 100@100 radius: 50.
shape displayFilledOn: gc.