royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <>
Subject Restructuring Composite Components
Date Thu, 31 May 2018 13:34:55 GMT
I’m working on redoing ComboBox and I could use some input on best practices.

Right now, ComboBox has ComboBox view which has three components hard-wired in. It has TextInput,
TextButton, and List. If any visuals or behavior need to be changed, the entire view needs
to be rewritten. We’ve already had two cases where I needed a new view. One was to disable
the TextInput input and change the button appearance. The second was to support images in
a dropdown.

It seems to me like the ComboBoxView should add the three components based on declared classes.
I think there should be 1. A “Button” component. 2. An ItemRenderer component for the
“input” which displays the selected item. 3. A List component for displaying the dropdown.
The question I’m struggling with is how to declare these.

I don’t think it makes sense to make these all beads. Currently Buttons are not beads.

Should we add interfaces (i.e. IButton) and declare the classes using interfaces? I mean something
similar to IItemRenderer.

Maybe just use ValuesManager to just lookup some other “name”? We’re currently doing
something similar with ColumnClassName in DynamicDataGrid.

Other ideas?

View raw message