In the Flex framework we have the following classes…
BoxDirection
FormItemDirection
TileDirection
TileBaseDirection
ScrollBarDirection
ScrollEventDirection
SliderDirection.
All for the purpose of setting the orientation of a component (defined as direction), each class has the following 2 public static constants…
HORIZONTAL : String = “horizontal”
VERTICAL : String = “vertical”
Do we seriously need all those classes for those 2 options?
I logged a request on this a while ago suggesting they all get replaced with a class called Orientation. This for me would seem a more useable/consistent approach, and also would give me a class to use in my own components that required an orientation property set on them.
https://bugs.adobe.com/jira/browse/SDK-15859
This issue is now assigned to ‘community’ and I get the feeling that means its just lost and ignored, which is why I thought I resurrect it with a post here.
As I noted in the request, direction isn’t the greatest name for the property on the components that use the above classes as direction also implies, up, down etc… Personally i think the a property called orientation is much more fitting. If change it would mean the following…
[as]myComponent.orientation = Orientation.HORIZONTAL;
myComponent.orientation = Orientation.VERTICAL;[/as]
… which to me looks much tidier.
On a side note does anyone look through the community issues regularly to vote?
