A Spark List is maybe a bit more compositional (if thats a word) than you would think.

It is a container, but it isn't really used as one (i.e. the Spark skinning issue previously discussed on this list), it doesn't really support Scrolling, it hands that off to a composite skin part Scroller, it does very little with renderers, as it hands that off to a composite skin part DataGroup.

It does implement drag and drop, single selection is inherited, but multiple selection is implement on top of this.

It doesn't support any form of item editing,


Tink


On 15 Jan 2012, at 21:01, David Arno wrote:

From: Jeffry Houser [mailto:jef...@dot-com-it.com]
Sent: 15 January 2012 19:54
I'm curious as to what your suggestions would be simplifying something
like this?
[Or ignoring my commercial component, the Flex List class]
I'd prefer not to comment on your commercial creations Jeffry, but I'll
comment on List.

The class does many things: it's a container; it displays the contents of a
data provider; it supports scrolling; it supports item renderers; it
supports dragging & dropping; it supports single selections; it supports multiple selections; it supports item editing etc. Classes should be single purpose. Therefore the List class should be a compositional class that is composed of IDataProviderSupport, IScrollSupport, IDragAndDropSupport etc and the functionality that is currently in List should be in classes that
implement those interfaces. That way, the currently overly-large,
over-complex, unfocused class could be broken up into a large number of
properly focused, smaller classes.

David.



Reply via email to