Flex memo: avoiding weird application behaviour
Sukurta 2009-11-12 21:44
While writing apps with Adobe Flex framework I have experienced a few situations when my programs started acting strangely. Actually, very strangely. So I've made up a list of things I should always remember (and probably you should) in order to avoid such situations:
- when creating istances of XML object, always provide initial data for constructor. Do not ever try doing something like this:
var xml: XML = new XML ();. This might make your application go crazy. In my case Flash debugger was jumping to random places all over the code and needless to say nothing worked as expected. Personally I like initializing XML variables just like this:var xml: XML = <name/>;. - When creating skins for
SkinnableComponentor any component extending it always setminWidthandminHeightproperties to0(zero) or any other value you need. Otherwise components contained within thisSkinnableComponentmight start acting strangely or you might not see them on the screen at all. This, of course, applies only to Flex 4.
I hope this will help someone to avoid wasting time for tracking strange behaviour of Flex applications. And in the future I expect this list to be even longer. Cheers!