user869097
user869097

Reputation: 1362

Adding a row in Spec results in a column?

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)?

Upvotes: 3

Views: 121

Answers (1)

Uko
Uko

Reputation: 13386

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.

Upvotes: 2

Related Questions