User Interaction - Fill in Object data?

Cees de Groot cg at cdegroot.com
Wed May 28 08:59:00 UTC 2003


On Wed, 2003-05-28 at 01:20, Avi Bryant wrote:
> I should point out that Lukas Renggli and/or Adrian Lienhard did some work
> like this in Seaside; I don't remember offhand whether it would have been
> easily generalizable to Morphic or not but one of them may pipe up.

Stuff like that is sitting in Sagan as well, however it needs to be
fleshed out - it is ported from our production VW environment where I'm
not too happy with the current state of affairs in this area.

Basically, I subscribe to Avi's notion that you want AttributeInfo or
whatever objects attached to the class. We employ a rich set of factory
methods on our Attribute class, with or without validators, hints for
the sort of UI elements to be employed (do you want 'date' to be a text
field or a calendar pop-up? Is some sort of 'select item from list'
field better presented with a pop-up menu or with a radio group?),
etcetera. 

It'd be good to have a common standard between Morphic and the various
Web toolkits that are there; not only because it would give more
flexibility, but also as an acid-check that the AttributeInfo thingies
really are UI-independent (if it abstracts enough to describe both a GUI
and a forms-based UI, it's UI-independent in my book ;-)).

We put the attribute list in a class instance variable initialized
through class-side #initialize. Usually, it starts with 'super
initializeAttributes' and then extends the list with local stuff.

Our Attribute class at the moment has the following instance vars: 'name
label rules default visible possibleValues indexed width previewable
mandatory displayOnly authorizedRoles rank signalChange group readOnly
onChangeAlert'. It has subclasses called 'BooleanAttribute',
'DateAttribute', ... I'm not going into details for each of the instance
vars and/or subclasses, some are a bit application-dependent, but it
shows the richness of metadata on attributes you can put down
independent of UI.



-- 
Disclaimer: all Dutchmen are liars



More information about the Squeak-dev mailing list