Hello, I have no documentation but examples. Basically either :
- you choose to write the default spec with row and columns, you can precise height or row of some elements. With this method it is easier to get what you want but quite slow sometimes. ex : (Inspector UI) defaultSpec <spec> ^ SpecLayout composed newColumn: [:c | c newRow: [:row | row add: #list width: 135; add: #description ]; newRow: [:row2 | row2 add: #text ] height: 75 ]; yourself - write down directly the position and size of elements ex : (debugger UI) defaultSpec <spec: #default> ^ SpecLayout composed add: #contextStackList origin: 0@0 corner: [email protected]; add: #debuggerToolBar origin: [email protected] corner: [email protected] offsetOrigin: 0@(-12.5) offsetCorner: 0@(12.5); add: #currentMethodText origin: [email protected] corner: [email protected] offsetOrigin: [email protected]: 0@0 ; add: #receiverInspector origin: [email protected] corner: 0.5@1 offsetOrigin: 0@4offsetCorner: 0@0 ; add: #contextVariableInspector origin: [email protected] corner: 1@1 offsetOrigin: 4@4 offsetCorner: 0@0; yourself The elements (for example #contextStackList) have to be both instance variables of the object and be initialized in initializedWidgets. ex : initializeWidgets self instantiateModels: #( contextStackList ListComposableModel debuggerToolBar DebuggerToolBar currentMethodText TextModel receiverInspector EyeInspector contextVariableInspector EyeInspector). You can see the example I showed you on smalltalkhub : user: ClementBera project: eye class: EyeInspector ex: 'Class ogle' or user: mate project: AST-interpreter Class: ASTDebuggerUI ex: run ASTDebuggerTest>>#testAsSymbol I hope I was able to help you, Clement 2013/3/25 Daniela Meneses <[email protected]> > Hi: > > I'm starting to develop with pharo using spec. I really like the spec > approach. I already review some examples that come with spec but I only get > UIs with a bad aspect by following the examples. > I would like to find more documentation and examples about how to write > the defaultSpec. Documentation about how to use the spec structure to > develop a nice and usable UI. > > Thanks in advance, > Daniela Meneses >
