All posts in Flex

Having spent most of Saturday trying to get files to upload from a Flex application to a Rails backend, fighting against both Flex and Rails all the way, I thought I’d collect together some of the things that have helped me work through this in the hope that others don’t have to spend quite as long battling through this. Note however that these are not necessarily best pratices, more a collection of tips that helped me in my situation, there are probably better ways to do some or all of the things that I’ll be writing about – and if you know of any improvements/alternatives I’d love to hear about them.
Continue reading this entry »

I’ve been doing quite a bit of unit testing on the Flex part of our new product lately and this has led me to fix a few issues and add some improvements to my FlexUnit Test Runner, I’ve been running with these fixes and improvements for a couple of weeks and finally took some time out yesterday evening to package them up so I could release them.

The key changes are:

  • Release has two downloads – one compiled to Flex 2.0.1 and one to Flex 3 – as it appears changes to Flex internals meant you couldn’t use the Flex 2.0.1 compiled swc in a Flex 3 project.
  • Fixed: Issue where error thrown when no test results selected.
  • Fixed: Issue where resizing columns could cause the itemRenderer for the status to display horizontal scrollbar.
  • Added: Ability to choose whether to display test results live or wait until all tests complete (as displaying them live results in slower execution of tests, as it’s constantly updating the UI) – this is saved as a preference.
  • Added: Ability to toggle display of the class path for the test case – this is saved as a preference.
  • Added: Test result details now extract Expected & Was from message string for failures and display in a manner that is easier to compare.
  • Changed: Test details now displayed on change rather than click event, to allow keyboard navigation of test results.

Head over to the FlexUnit Test Runner code page for all the downloads and to see the updated demo.

Recently I was creating a set of in place editor custom components for our project at work and I noticed that when I placed them inside a FormItem that they didn’t line up with the label of the FormItem. I left it when I first noticed it as I didn’t have time to fix the issue but when I returned to it I had to do plenty of digging to figure out the problem.
Continue reading this entry »

A couple of weeks ago I was looking for some more examples of using the measure() method in one of my custom Flex components and I found this series of excellent tutorials of how to create a custom component by Peter Ent:

Continue reading this entry »

The FlexUnit Custom Test Runner is a customised FlexUnit test runner which aims to improve the presentation and ease of use of running FlexUnit tests.

I have used unit testing in a few different languages, so obviously when I started using Flex I wanted to start off on the right foot by using unit testing from the outset. However after a couple of days using the base runner which is provided with FlexUnit I found myself spending a lot more time than I thought I should just looking for the details of the problem in the flex runner.

So as usual I attempted to make something that would work a little better for my requirements, see the FlexUnit Custom Test Runner code page find the full details and the download. As usual any comments should be made on the code page.

Towards the end of last week I spent quite a lot of time working with customisations of the ComboBox in Flex 2 for work, and it was really beginning to bug me how when I typed to select an item, the selection was only ever the first item that matched the letter I was typing. Having had it become second nature, since it’s a feature of my browser of choice Firefox, that I can type the beginning of a word to jump to an option (e.g. "United K" to jump to "United Kingdom" in a list of countries) I now really missed it when using Flex.

I didn’t have time to look at a work around during work hours as it really isn’t a feature that is needed of our product, just something that annoyed me. So I decided that I would quickly knock a solution together at the weekend and then write up a short post of how it was done, in case other people wanted to find out how to do it.

However it didn’t quite work out that way.

After a few frustrating hours I managed to get a fully working solution which I thought I’d share. You can read on for the story behind the component, or you can head straight to the FoxyComboBox code page to view the results.
Continue reading this entry »

Code: MXML GeSHi Language File

3 comments, join the discussion.

While just writing my first post about Flex which required some code examples in MXML, I found that currently GeSHi (Generic Syntax Highlighter) doesn’t have a MXML language file, and I couldn’t find one when I did a few searches.

So using the XML language file as a base I quickly knocked one together.

Firstly, I know I've been very quiet recently, that's because a lot has happened recently - which I'll go into in more detail at another time. The upshot of these changes is I'm now working with Flex quite heavily (YAY!), hence the Flex Tip post.

So what do I mean about being careful with your names, well today I had the following:

  1. <testhelper:functionaltesthelper id="testHelper" testSteps="{testSteps}"></testhelper:functionaltesthelper>

Which seems reasonable enough, however the compiler hated it, throwing me a 1202 error of "Access of undefined property testSteps in package testHelper.".
Continue reading this entry »

I was notified yesterday by a friend of mine Martin Laine that Ben Forta had blogged about a interview with me on Web Wire.

First of all, wow, Ben Forta - so it was just a passing mention, but for anyone working in the CF or Flex development fields Ben Forta is a very important and influential figure. Secondly, I still find it amazing how quickly the web moves, I received the final copy of the interview copy in my inbox on Thursday afternoon and by Friday morning it had been picked up by Ben Forta and relayed to myself via Martin.

Finally the interview on Web Wire appears to have been edited a little, I'll try and get my hands on the original and post it here.

A couple of weekends ago I took my first real look at Flex 2.0 Beta. To say that I loved it is an understatement, I've even added a Flex category to my site in anticipation of many future posts about it.

I simply spent the weekend watching the demo videos & running through all of the tutorials and then started to play around with the Coldfusion/Flex connectivity and believe I grasped a large amount of how to work with Flex 2.0 within that time.
Continue reading this entry »