Archive for 'flex'

HowTo create your developer ToolBox with Mixins

In this post I’ll explain how you can develop a flex library that automatically initializes itself avoiding developers the hassle of remembering how, when and where the libraries need to be initialized and hooked into the application. This can be particularly helpful for debugging libraries like fxSpy, DeMonsterDebugger, KaptInspect, mrdoob, etc. and extremely useful to [...]

Global Exception or Error Handling in Flex

In this post I explain how you can catch unhandled exceptions or errors globally in a declarative mxml-based way using the [Mixin] flex-specific metadata tag.
Starting on FP 10.1 and AIR 2.0 you can capture unhandled exceptions or errors globally. Although you can use these new APIs you should always take care of the exceptions where [...]

Properties file based configuration mechanism for Parsley

In this post I introduce a new mechanism for Parsley to load part of a Context from a properties file. This way highly dynamic of changing properties can be managed externally from the properties file, avoiding the verbosity of an XML approach. As always, the source code is attached.
One of the things I like a [...]

String Templating in Flex

When working with String templates, code can easily become quite difficult to read and, consequently, to understand, maintain and modify. This blog post explains 2 techniques that can help you dealing with String concatenation and templating: StringUtil.substitue and [Embed] compiler directive.
For simple String concatenation like:
var value : String = "The value " + user + [...]

DualPanel Reversible Component

This week I’ve been discussing with Alberto from undefined.es different ways to implement a reversible panel. Basically a reversible panel would be a 2-sides panel. In the front part you could have the component or widget and in the back you could have a configuration panel (same concept as in the OSX Dashboard widgets).
One way [...]

Template Components in Flex4

Template Components can be quite common in different sort of applications. Maybe the most common one is the Panel, which has a predefined set of components (title bar, status bar, close button, etc) and an specific area where we can instantiate any other component we wish.
In Flex3 you could use the technique explained in the [...]

Disabling Bindings on certain Views to avoid unnecessary processing time

Once a view has been created, Bindings will always be active no matter if the view is invisible or removed from Stage.
There might be cases when a View is constantly receiving Binding updates (i.e. connected to an LCDS server with big amount of data transfer or messages). Imagine the view that is processing all the [...]

Carroflow. Another 3D layout for Flex4

This is an experiment I did a while ago when working on the Coverflow layout. I’ve been waiting to find some spare time to fine tune it, to improve it’s performance, clean the code and tweaking in general. But I know that if I don’t push it out now it will be lost in some [...]

Flex4 Coverflow Layout

Flex4 has shipped and it comes with a ton of new features that open lots of doors. One of my preferred features in which I see a tremendous potential is the new layout mechanism.
As an exercise to better understand the details of the new layout mechanism I played a couple of days creating some layouts [...]

Some thoughts on constructor and method parameters

I consider a best practice to keep to the minimum the number of arguments a method accepts. As uncle Bob explains in his “Clean code” book we should always favour niladic (no arguments), monadic (1 argument) or dyadic (2 argument) methods and avoid whenever possible methods with more than 3 arguments, if not possible we [...]