I'm trying to write some better beginner docs for FlexJS components this
afternoon. I don't actually have any time to do this, but it absolutely
needs to be done for the good of FlexJS so I'll try to get something
started. Anyway, as a semi-beginner with the framework, I'm paying close
attention to the weird errors I run into along the way so that they will be
known and can be addressed.

I just created a simple app with <js:Application>. I quickly discovered
that the valuesImpl property must be set or an exception will be thrown.
I've seen enough code on the list to guess that I can probably use
SimpleCSSValuesImpl. A complete beginner won't know that, though.

In org.apache.flex.core.ContainerBase (in both Basic and HTML, but maybe
elsewhere?), I found the following code where the exception is thrown:

if (!_initialized)
{
    // each MXML file can also have styles in fx:Style block
    ValuesManager.valuesImpl.init(this);
}

I'd like to make this better for beginners who might not know what's wrong.

Will it completely break anything if we skip the call to init() when
valuesImpl is missing? In other words, is a valuesImpl essential to a
FlexJS application? If not, we should skip calling init() instead of
allowing this vague exception to be thrown. If bad things will happen, then
we need to preemptively throw a different exception with a better
description of what's wrong.

- Josh

Reply via email to