360|Flex DC was last week, and it was a great time. I got to see a lot of old friends and met a ton of new, cool people. I’m not sure how useful they will be on their own, but I wanted to post my slides here for anyone who might be interested in them. I had planned to do a walk through of a Swiz application that includes Flex modules, but was pretty low on time and had to run through it pretty quickly. I will be cleaning up that example soon and pushing it to GitHub as our reference implementation of using Swiz with Flex Modules, but it’s not quite ready yet.
Enterprise ActionScript: Writing Clean Code Fast with Swiz 1.0
Enjoy!
Last night while working on Swiz I ran into FB-12316 – Code hinting doesn’t work with DefaultProperty. It has been fixed in Flash Builder, but those of us still using Flex Builder were apparently out of luck. What the problem boils down to is that if you are using the [DefaultProperty] metadata tag to point to an Array property, code completion breaks unless the property is decorated with [ArrayElementType] metadata.
My Array was not decorated because it can hold items of any type. Therefore, code completion was borked. I wrestled with the problem for a long time, and then as I was waiting to fall asleep last night it occurred to me that in ActionScript everything is actually a descendant of Object. So this morning the first thing I tried was decorating the property with [ArrayElementType( "Object" )] and it worked!
So there you have it, an easy workaround for Flex Builder users! I hope this helps someone get past this a lot quicker than I did.
Enjoy!
Recent Comments