Archive for the ‘resource manager’ tag
foomonger-swizframework Updated With Swiz 1.0.0 RC1
Swiz 1.0.0 RC1 was recently released so I've updated my custom metadata processors to work with it. Head over to Google Code to check out [MediateSignal] and [Resource]. Happy coding...
Swiz, ResourceManager, and [Resource]
I'm using the Swiz Framework in a side project which requires runtime loading of all the copy. I decided to use Flex's ResourceManager by parsing static XML files and populating the ResourceManager with the newly created ResourceBundles. Binding resources into view's wasn't too bad, but it could be better. For one thing any component that needed a resource included a ResourceManager dependency. So I thought about it and then created a ResourceProcessor which really cleans things up.
Here's an example application:
I set up the [Resource] tag to mirror the @Resource directive. All you do is decorate a property like so:
[Resource(key="title", bundle="example")] [Bindable] public var title:String;
The processor binds the resources so they will update when binding events fire in the ResourceManager. And you only need to include a ResourceManager dependency if you are adding resources at runtime or changing the locales array.
This processor is available in my foomonger-swizframework project on Google Code. Enjoy!