Archives for April, 2009

6
Apr

Using Resource Bundles in MXML for simple strings

There are a few ways developers can use resource bundles in a flex application. When using a resource bundle, in particular a simple string, inside of an mxml file you can gain access to the resource using the resourceManager or by using the @Resource directive. For simple strings, meaning strings you are not going to tokenize you should be using the @Resource directive instead of the resourceManager.
[Read more →]

6
Apr

Skinning Checkbox with Error State

Similar to skinning a combobox with an error state, there may be times where you need to show the error state for a checkbox without showing its error string.

[Read more →]

6
Apr

Skinning ComboBox with Error State

Since the ComboBox doesn’t come with an out-of-the-box error state / skin without using an error string, you can grab the sample code below to give your comboBox an error skin. The example implements the interface IValidatable which for the most part is a stub interface that should be considered itterable by the application so you can easily request that any IValidatable component shows its error state ( showError() ). The point of doing this instead of using set errorString is that in certain instances you may not actually want to use an error string, or in the case of a comboBox you may want to have its parent container show the error string.

Another case to use this method of validation would be if you have a parent container with multiple controls inside of it, the parent container is responsible for messaging the error to the user but each control should display an errored state regardless of displaying an error string.

[Read more →]