[Pharo-dev] [Pharo Trick: #0007] - Write UI prototype in a workspace

Benjamin Benjamin.VanRyseghem.Pharo at gmail.com
Thu Dec 12 04:37:51 EST 2013


-----------------------------------------------------------------------------------
[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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131212/4ff0f852/attachment-0002.html>


More information about the Pharo-dev mailing list