2016-05-09 11:38 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
No. Morphs are created by Adapters, Spec interpreter instantiates glues everything together. Regardless, there's no parsing involved⦠what is there to parse? There are no literal arrays anywhere. The SpecLayout (that we called array last week), is not an array, it's a composition of real objects
defaultSpec ^ SpecLayout composed newRow: [ :row | row newColumn: [ :col | col add: #topToolbar height: self toolbarHeight ] ] height: self toolbarHeight; newRow: [ :row | row newColumn: [ :col | col add: #navigatorModel ] origin: 0 @ 0 corner: 0.2 @ 1; addSplitter; newColumn: [ :col | col add: #tabManager ] origin: 0.2 @ 0 corner: 0.85 @ 1; addSplitter; newColumn: [ :col | col add: #formModel ] origin: 0.85 @ 0 corner: 1 @ 1 ] top: self toolbarHeight; yourself
Maybe array approach deprecated? But in first demos of Spec it was like this: CheckBoxExample class>>defaultSpec ^ { #ContainerModel. #add:. { self topSpec. #layout:. #(#SpecLayoutFrame bottomFraction: 0 bottomOffset: 20) }. #add:. {{#model . #container } . #layout: . #(#SpecLayoutFrame topOffset: 22) } } (Actually it is from Pharo 5 image).