pharoseaside

Message order cascading on " html anchor callback: [ 1 + 1 ]; with: 'Click me' " matters?


In Seaside it seems these two return different results. First one works and produces a vaild link, the second one doesn't, why does it matter which you send first?

html anchor callback: [ 1 + 1 ]; with: 'Click me'.
html anchor with: 'Click me'; callback: [ 1 + 1 ].

Solution

  • The best explanation about this can be found in the Seaside book, section on brush structure.

    In Seaside, with: should always be the last message in a cascade sent to a brush. This is because the nested renderable that is the argument of with: specifies the inner contents of the html tag.

    Technically, sending with: causes the brush to be written to the canvas. As such, anything you send to the brush afterwards cannot affect the rendered html anymore.