3

The current API of Spec is totally counter-intuitive. I am trying to stack up two rows in a SpecLayout. How is that adding a row ends up with two columns?

| m |
m := DynamicComposableModel new.
m instantiateModels: #(text1 TextModel ok OkToolbar).
m ok okAction: [ m window delete ].
m openWithSpecLayout: (SpecLayout composed
    newRow: [: r | r add: #text1 ; add: #ok ];
    yourself).

SpecLayout with two columns

and adding another TextModel will be placed as a new column... How to add real rows, as everybody understands them: one widget below or above, instead of adding them to the right or left (as columns)?

Uko
  • 13,134
  • 6
  • 58
  • 106
user869097
  • 1,362
  • 8
  • 16
  • There are a couple of interesting **Spec** questions. We should see, if we could come up with a tag for those. Of course **Spec** is already taken. Perhaps **Spec-UI**? – MartinW Jun 07 '14 at 10:43

1 Answers1

2

Because you add a row, and add items to row. And items of row are positioned horizontally. So if you want to position something vertically, you have to add it to column.

Uko
  • 13,134
  • 6
  • 58
  • 106