[Pharo-users] Spec layout

Peter Uhnák i.uhnak at gmail.com
Tue May 17 12:22:12 EDT 2016


I don't have time right now to give you a proper example…

however if you have layout on the instance side, then you need to call the
build method explicitly with the proper layout… well, that's what I do at
least

https://github.com/dynacase/dynacase/blob/master/repository/DynaCASE-Spec.package/DCPalette.class/instance/rebuildWidget.st#L6
https://github.com/dynacase/dynacase/blob/master/repository/DynaCASE-Spec.package/DCPalette.class/instance/dynamicLayout.st


On Tue, May 17, 2016 at 6:48 PM, Marion Noirbent <
ms.noirbent at etudiant.univ-lille1.fr> wrote:

> Hi,
> I'm trying to create a widget whith Spec, managing a collection of
> RadioButton. But I have a problem with defaultSpec (the accessor of the
> collection is the methods "buttons") :
>
> If i put defaultSpec on class side, i can't acces the collection of the
> instance. (the following code iterate on the string)
>
> defaultSpec
>         <spec: #default>
>         ^ SpecLayout composed
>                 newColumn: [ :column | #buttons do: [ :item | column add:
> item ] ];
>                 yourself
>
> If i put it on instance side, the lookup don't find it (in the book
> Building UI with Spec, it said the lookup begin by the instance side and it
> allow to have specific UI, in part about layout)
>
> defaultSpec
>         <spec: #default>
>         ^ SpecLayout composed
>                 newColumn: [ :column | self buttons do: [ :item | column
> add: item ] ];
>                 yourself
>
> Any idea ?
>
> Marion Noirbent,
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160517/3b4e1ab6/attachment.html>


More information about the Pharo-users mailing list