Sunday 21 June 2009

Picasa Tool Update

I’ve updated my picasa tool slightly. Firstly I have corrected the spelling from picassa to picasa and I have added some more text fields. This is mostly to make it easier for me to include pictures on my car blog.

Updated version is here:

http://giles.roadnight.name/picasaTool/

There is still more that I would like to do with this tool. Ideally you’d be able to log directly into your picasa account and browse the albums and images directly and pick your image in that way.

Previous attempts to do something similar got tricky as picasa does not have a crossdomain.xml file.

Maybe I’ll do it in an air app one day.

Skinning Panel with borderSkin

I spent far longer than I should have about a week ago trying to skin Panel. This should have been a simple task but it took me about 2 days.

What I was trying to achieve was to skin a Panel with an asset from Flash as a border skin. To begin with we have an un-styled Panel (all the below versions have view source enabled):

If we then add a borderSkin style we can see that the content of the Panel overlaps the titleBar and controlBar:

As we are using our own skin class in this example one possible fix is to make our skin class extend IRectangularBorder:

The problem is though that if we are using an asset to skin our panel we can’t make the asset implement IRectangularBorder. Looking at the code for Panel there is a get viewMetrics function that is supposed to calculate the border around the content area. In our case this is not working so it seems logical that we can override it as follows:

override public function get viewMetrics() : EdgeMetrics
{
    var metrics : EdgeMetrics = super.viewMetrics;
    if( titleBar )
    {
        metrics.top = titleBar.height;
    }
    if( controlBar )
    {
        metrics.bottom = controlBar.height
    }
    return metrics;
}

However if we do this we get this result:

We get extremely odd behaviour in all sorts of other view components even outside our panel. The extra top and bottom that we add to the view metrics seems to get progressively applied to buttons, other non styled Panels and all sorts of other view components.

The solution to this is to change the above code very slightly:

override public function get viewMetrics() : EdgeMetrics
{
    var metrics : EdgeMetrics = super.viewMetrics.clone();
    if( titleBar )
    {
        metrics.top = titleBar.height;
    }
    if( controlBar )
    {
        metrics.bottom = controlBar.height
    }
    return metrics;
}

And we get the following:

I can only guess that the layout class used by Panel retains references to the EdgeMetrics objects returned from super.viewMetrics and this somehow messes up the layout of other components.

I have submitted a bug here that you can vote on if you like.

I hope this blog post helps someone else out who comes across the same problem.

Tuesday 9 June 2009

Read Write Web article on the Matrix

Read Write Web have an article on the Matrix. They are pretty enthusiastic. Have a look here.

I think that this is all based on the microsite and don't think that they have looked at the actual app.

Shared via AddThis

Tuesday 2 June 2009

Morgan Stanley Matrix

I’m finally allowed to talk about the project that I have been working on for pretty much the last year. I have been working for Morgan Stanley on a sales and trading platform.

This is by far the biggest project I have ever worked on and there are some really talented people on the team. I have really enjoyed working on this project. I have learnt so much in the last year. Despite the product launching soon there is still a lot of work to keep us all busy for the next few months.

Obviously I can’t link to the actual app as you need a login but there is a microsite that you can take a look at. I didn’t actually work on the microsite but it gives you some idea of what the actual application is like.

http://www.morganstanley.com/matrixinfo/

Google Wave

I'm really excited about Google Wave. It it becomes widely accepted I think it could be really useful. Check out the video:

http://www.youtube.com/watch?v=v_UyVmITiYQ