Showing posts from June, 2008

on AIR Tour Europe 2008

[fa:p:id=2544034195,j=l,s=t,l=p] I was there! In Stockholm of course! In the last few months I've been working with Flex so now it was time to check what Air was about. I really like flex and I've already learned a lot of it. I just need a more concrete project to work on. Do you need any flex consultant? (Söker du en flex konsult?)

Easier Flexunit configuration

I wrote an utility class to simplify the configuration of a flexunit testsuite. All methods starting with "test" are added automatically as test cases when the suite is created in the following way: [source:js] private function createSuite():TestSuite { var ts:TestSuite = new TestSuite(); ts.addTest( ReflectiveTestCase.suite(SelectItemCommandTest)); return ts; } [/source] The ReflectiveTestCase uses reflection to read all "test" methods. In this way you will never forget to add your tests to the suite! [source:js] package mypackage { import flash.utils.describeType; import flexunit.framework.TestSuite; public class ReflectiveTestCase extends TestSuite{ public function ReflectiveTestCase() { } public static function suite(clazz:Class) : TestSuite { var ts:TestSuite = new TestSuite(); var methods:XMLList = describeType(clazz).factory.method.@name; for(var i:int =