Re: Initialisation of componentClass
Stephan Eggermont <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Message-ID | <[email protected]> |
On 16-05-16 12:09, Iwan Vosloo wrote: > Hi there, > > We have an issue related to magritte-seaside. > > When you set the Component to be used on a MADescription, eg: > > descriptionThings > ^ MAToManyRelationDescription new > ... > componentClass: MyFancyTableComponent; > yourself > > .. then there is no way (that I am aware of) to initialize the created > MyFancyTableComponent in a customised way. > There are several ways to do this, and Magritte provides the building blocks to choose the one reducing duplication most. In QCMagritte, we chain the visitors building the form to do e.g. translations and access control. In Magritte 'style' you'd want to prefer a declarative style with properties over coupling the description strongly to the component. Important for your choice in how to do this is also the question of reuse. If you need it once, your first solution, or just a subclass is fine. In a UI that adapts to screen size, you might want to avoid direct numbers and use properties like large, wide, small to direct the layout Stephan