Tuesday, November 23, 2010

Default Flex DateChooser to tomorrow

I have a DateChooser control and I was trying to default it to have tomorrow's date selected. This is actually really easy to do, but it took me a fair amount of time to figure it out, so I thought I'd post this just in case anyone else has some trouble.

Create a variable for today's date:
[Bindable] private var today:Date = new Date();

Then set the selected date of the DateChooser. You may also want to set showToday to false so that today's date isn't highlighted.

<mx:DateChooser selectedDate="{new Date(today.fullYear,today.month,today.date+1)}" showToday="false"/>

The selectedDate property only understands straight dates with no time, which is why I had to assign it this way. If you're at the end of the month/year Flex is smart enough to know that date + 1 should take you to the next month/year.

Here is a sample with view source enabled.

Friday, November 19, 2010

Word wrap in AdvancedDataGrid

So getting a column field to wrap in an AdvancedDataGrid isn't as easy as just setting the "wordWrap" property to true. Maybe it should be, but it isn't.

First thing's first. Do you have an itemRenderer on the column you're trying to wrap. If the answer is yes you have to make sure that itemRenderer is based on a wrappable component. For argument's sake, lets say you have a Label itemRenderer, well you're going to have to change that to be based on Text, and you're going to have to give it a width to give it the capability to wrap (percentWidth = 100 works nicely).

Then set your wrap-able column to wordWrap = true.

Finally set your AdvancedDataGrid to have property variableRowHeight = true.

Here is a link to an example with the view source enabled.

Tuesday, November 9, 2010

My first experience doing contextual research

For some back story – I’ve been on this project for 2 years now. I’ve helped design and build two dashboards and have never had the opportunity to meet or talk with a user until now and I am no expert in the client's line of business.

I met with 7 users from 3 different user groups; 1 group per day; 30-45 minutes with each user, followed by an hour group session discussing the observations. A lot of them have similar issues. Issues within groups of users seem to be pretty much the same.

I found myself getting frustrated and having to consciously calm myself down while meeting with the users. Seeing the roundabout way some of them had to work just to use the system drove me crazy. If I had only been involved from the beginning in this capacity, and with the requirements gathering for each release, these poor users wouldn't have to deal with a system that really doesn't meet their needs. But hey, better late than never I suppose. That is the story of my life... the story of UX.

I had some follow up meetings with some managers and I could feel the overall manager not taking all of the feedback seriously. His job is to get things done quickly and at the lowest cost... and lets face it, UX takes time and money, and when done in the beginning will save so much time and money in the end. What I basically want is a redesign of a two year old system. That's a hard sell. But, being an outside consultant, I can push for my cause a little more than the average employee. That is why they hire us, after all.

I typed up all my observations and recommendations and sent them off to my manager. I broke them out into three categories; 1 – quick fixes, 2 – can be done leaving the main system as is, 3 – needing a total redesign.

Our plan of attack is to pull out the major changes and estimate how much time each one will save each user, and then do the math. Time equals money, and if the changes save enough money, we can go after some funding to make the system better. If nothing else, we can at least implement the quick fixes over the next couple months.

All in all, it was a very positive experience for me. I thought I would have been more uncomfortable with it all, being that I’ve never done contextual research before, but it was all very natural once I got there and was sitting with the users.