Skip to main content
February 15, 2009
Question

(Fx)ComboBox architecture

  • February 15, 2009
  • 13 replies
  • 3603 views
Hi,

I was unable to attend i11 meeting but I have fund that you are going to implement (Fx)ComboBox during this iteration. As I have very mixed feelings about ComboBase in Flex 3 I would like to share my comments before FxComboBox is implemented.

Generally:
FxComboBase should focus on displaying the textfield/button and handling dropdown (including dropdown creation, showing, hiding, effects etc.). It should be easy to put any components inside the dropdown.

In Flex 3 every subclass of ComboBase(ComboBox, ColorPicker, DatieField) implemented dropdown handling separately, while ComboBase was playing around with iterators, selectedItem/Index and UIDs stuff which is specific to ComboBox not a ComboBase.
As a result of that when I needed to create a custom Combo-like component with TextInupt and Tree inside a dropdown I found that it was easier to create it from scratch than to extend ComboBase.

My idea on how it should be changed:

FxComboBase:
- It should contain 3 skin parts: text field (optional), button and dropdown
- Dropdown should be a Group so that subclasses could put any components inside it (probably FxComboBase could extend FxContainer)
- It should implement methods responsible for showing/hiding the dropdown as well as variables indicating if dropdown is shown
- selectedItem/selectedIndex properties should not be included in FxComboBase as they are not common for all of its subclasses.

FxComboBox:
- FxComboBox should extend FxComboBase
- Single selection FxList should be placed inside dropdown
- All functions like get/set selectedIndex/selectedItem etc. should be mapped to FxList functions
- Default property should point to FxLists dataProvider
- Selected items label should be mapped as buttons label

CustomComboComponent:
- It should extend FxComboBase
- A number of components should be placed inside dropdown
- Button label should be set
- Only CustomComboComponents specific logic should be added without need to think about stuff like showing or hiding dropdown.

What do you think about this concept?
Could you publish FxComboBox specification draft before it is implemented so that we can discuss it?

Cheers,
Iwo Banas
This topic has been closed for replies.

13 replies

March 17, 2009
Thanks for the suggestion Jakes. Please file an enhancement request.
Participant
March 17, 2009
This is just a suggestion.

It would be nice to have a searchable option for combobox. Google mail has a very nice way of filtering dropdown components. We can filter the labels by doing a search on it (top dropdowns in google mail).

As a developer i would expect the following properties for the combobox:
searchable = true|false
filterFunction = Function

(Filter function should be able to return a data provider for the combobox)

Thanks,
Jakes.
matt_chotin
Inspiring
February 15, 2009
The spec will hopefully go live this week.  I think it probably matches up with most of your thoughts.





On 2/15/09 7:02 AM, "Iwo Banas" < member@adobeforums.com> wrote:



A new discussion was started by Iwo Banas in



Developers --

  (Fx)ComboBox architecture



Hi,



I was unable to attend i11 meeting but I have fund that you are going to implement (Fx)ComboBox during this iteration. As I have very mixed feelings about ComboBase in Flex 3 I would like to share my comments before FxComboBox is implemented.



Generally:

FxComboBase should focus on displaying the textfield/button and handling dropdown (including dropdown creation, showing, hiding, effects etc.). It should be easy to put any components inside the dropdown.



In Flex 3 every subclass of ComboBase(ComboBox, ColorPicker, DatieField) implemented dropdown handling separately, while ComboBase was playing around with iterators, selectedItem/Index and UIDs stuff which is specific to ComboBox not a ComboBase.

As a result of that when I needed to create a custom Combo-like component with TextInupt and Tree inside a dropdown I found that it was easier to create it from scratch than to extend ComboBase.



My idea on how it should be changed:



FxComboBase:

- It should contain 3 skin parts: text field (optional), button and dropdown

- Dropdown should be a Group so that subclasses could put any components inside it (probably FxComboBase could extend FxContainer)

- It should implement methods responsible for showing/hiding the dropdown as well as variables indicating if dropdown is shown

- selectedItem/selectedIndex properties should not be included in FxComboBase as they are not common for all of its subclasses.



FxComboBox:

- FxComboBox should extend FxComboBase  

- Single selection FxList should be placed inside dropdown

- All functions like get/set selectedIndex/selectedItem etc. should be mapped to FxList functions  

- Default property should point to FxLists dataProvider

- Selected items label should be mapped as button’s label



CustomComboComponent:

- It should extend FxComboBase

- A number of components should be placed inside dropdown

- Button label should be set

- Only CustomComboComponents specific logic should be added without need to think about stuff like showing or hiding dropdown.  



What do you think about this concept?

Could you publish FxComboBox specification draft before it is implemented so that we can discuss it?



Cheers,

Iwo Banas




View/reply at (Fx)ComboBox architecture < http://www.adobeforums.com/webx?13@@.59b7eed4>

Replies by email are OK.

Use the unsubscribe < http://www.adobeforums.com/webx?280@@.59b7eed4!folder=.3c060fa3>  form to cancel your email subscription.