Smalltalk - Seaside, Magritte: "object description" 给予 "MessageNotUnderstood" 异常

Smalltalk - Seaside, Magritte: "object description" giving "MessageNotUnderstood" exception

我正在阅读海边之书 (http://book.seaside.st/)。我目前正忙于马格利特的章节。

我遵循了第一个示例 (http://book.seaside.st/book/advanced/magritte/first-examples) 的步骤,但是当我尝试检查对象的描述时,我得到了 MessageNotUnderstood: Address >> descriptionStreet.

|address|
address := Address example1.
address description.

如果我理解正确的话:

Note that there is no need to have a one to one mapping between the instance variables of the class and the associated descriptions.

All descriptions are automatically collected and put into a container description when sending description to the object

我的地址 class 中不需要 "description" 选择器?为什么我会收到错误消息?

海边的书已经过时了。

在 Magritte3 中,您不使用 "description",而是使用 "magritteDescription"。

如果您正在学习这本书,您稍后也会 运行 遇到表单未呈现的问题。在 Magritte3 中,您必须将 pragma 添加到描述方法中,并且描述方法应该在实例端,而不是书中指示的 class 端。

看到这个link:http://www.slideshare.net/nickager/magritte3

对街道的现代马格利特描述可能如下所示

Address>>descriptionStreet
    <magritteDescription>
    ^ MAStringDescription new
        accessor: #street;
        label: 'Street';
        priority: 250;
        yourself