----------------------------------------------------------------------------------- [Pharo Trick: #0007] - Write UI prototype in a workspace ----------------------------------------------------------------------------------- Works in: Pharo 2.0, 3.0, ... -----------------------------------------------------------------------------------
In Morphic, there is no way to quickly prototype a UI. But in Spec there is a Dynamic class supporting this, so one can try different things directly from a Workspace An example: m := DynamicComposableModel new. m instantiateModels: #( button ButtonModel list ListModel). m list items: #(1 2 3 4 5). m button label: 'Plip'; action: [ self halt ]. m openWithSpecLayout: (SpecLayout composed newColumn: [: c | c add: #list ; add: #button height: 26 ]; yourself). Ben