Makes sense to me. As far as #1 goes: I added the following two functions to the main component. I think that makes the most sense. Putting it into a utility class would require passing in the colorField and labelField values: public function getColorValue(color:*):uint public function getColorName(color:*):String
I made the textInput act more like the mx component as well (padded with zeros, allowed hash input, etc.) I'm trying to decide whether it makes sense to allow setting editable to the main component or if that should be taken care of totally by the skin. It seems to me a waste to have to create a new skin for specifying whether the component is editable. If the comppnent has an editable property, should that automatically change selectable as well? Harbs On Mar 1, 2013, at 5:42 PM, Nicholas Kwiatkowski wrote: > Harbs, > > I'm personally not a fan of sending untyped data back and forth > -- especially if it is at all possible to avoid it. What are your thoughts > on sending back a color:uint and colorObject:Object as separate items > within the event? > > -Nick > > On Fri, Mar 1, 2013 at 10:01 AM, Harbs <[email protected]> wrote: > >> I've expanded the Bogdan ColorPicker to accept a dataProvider including >> color objects similar to the way the mx ColorPicker worked. >> >> I have a few things that I could use input on: >> >> 1) Both the skin and the component have functions to compute the color >> depending on whether it's a uint or object. As it stands the functions are >> duplicated. Is it a better design to have the function in a single place >> (i.e. the main component or a utility class)? >> >> 2) ColorChangeEvent dispatches the color an a uint. This is the way the mx >> component worked as well. I'm thinking that it makes more sense for the >> event to contain a color object for complex color objects. It is >> conceivable to have two color objects with the same color value. I'm >> thinking of changing the type of the color payload to "*" and it'll contain >> whatever is selected whether a uint or complex object. Another possibility >> is adding a data property which would contain the color object. Thoughts? >> >> 3) I personally extended the component to be able to select arbitrary >> colors for my own use. Does anyone see value of adding that capability to >> the main component? >> >> I'll probably attach my changes to a JIRA ticket next week… >> >> Harbs
