Smalltalk新线?

MrD*_*Duk 2 smalltalk

我根本无法解决这个问题:

renderContentOn: html
    html form: [
        html textInput
        on: #newEmp of: self.

        html submitButton
        callback: [ self addEmployee: newEmp ];
        text: 'Add Employee'.

        self employeeNames do: [ :eachEmp |  html text: Character cr asString. html text: eachEmp.]
    ]
Run Code Online (Sandbox Code Playgroud)

我只是继续将输出放在一行上.我错过了什么吗?我尝试了几种变体cr但到目前为止还没有.

Max*_*ske 6

不要依赖回车来在浏览器中显示您的数据.员工姓名显然属于列表或表(您提供的是名称列表):

html unorderedList: [
    self employeeNames do: [ :eachEmp | 
        html listItem: [
            html text: eachEmp ] ] ]
Run Code Online (Sandbox Code Playgroud)