Paying for components (especially the AdvancedDataGrid)

May 29th, 2008

In response to Per Olsens comment about how the Charting components and AdvancedDataGrid is bound to the license of the Flex builder IDE, I actually don’t mind it to much! Just for clarification, I’ve never used the Design view to develop my application, so in all honesty I don’t really need to use flex builder 3 to develop with. I just do because its a pretty awesome IDE. As for the components, I’m quite happy to pay for them (OK my business pays for them) because at the end of the day, I do understand that adobe is a business, and it has to make money some how. They are a bargain for the price, plus you get to look at all the neat source code underneath, and marvel at how well written they are.

Flex Builder 3 yay!

March 20th, 2008

So I convinced my boss to buy Flex Builder 3 pro today, and i’m loving it. I’ve already spotted a memory leak, with the profiler! Not that its good news or the fact I can’t find out why the memory leak exists, but its damn nice to know that I can actully see it.

Can’t wait to try out the Advanced datagrid, as we are currently using a pretty nasty implmentation of repeaters and datagrids, which is slowing the hell out of the app.

Fun times ahead!

viewMetricsAndPadding

February 4th, 2008

Couple of days ago, I had to write a custom container that would layout its children in a very specific way (four items in a diamond formation) and I also had to create a skin that would draw some lines connecting each of these items. I started by overriding the updatedisplaylist function, and put some code in to determine positions by the unscaledwidth and unscaledheight. Great!, next I added a sprite to the rawchildren on the container and programmatically drew some lines, Great! Perfect!

Then the spec changes…. They wanted a double border added to the container skin, to give it a nicer look (it also had to be controlled from CSS). So off I went to extend the haloborder skin to add another innerborder. Now, all skins that change the size of the border must also change its borderMetrics function, so that whenever a container uses this new border skin, it can know how much space it can use to draw its child objects.

After running it, I discovered that all the uicomponents were out of alignment to programmatically drawn lines, they all seemed to be slightly offset. Turns out that if you use extend container, all child UIcomponents will automatically take into account the edgemetrics from the chrome, and position themselves accordingly. That’s even after you use UIcomponent(someObj).move(x,y)!  thats where viewMetricsAndPadding():EdgeMetrics comes in. This will tell you how much padding you need to save for when the scrollbar or thickend border comes into play. So anytime you are writing a custom component for non standard layout, don’t forget to check how much space you actually have!

FocusManager problem (States and Popupmanager)

January 9th, 2008

Ok, just spent most of the day trying to fix a wierd bug with an itemrenderer and a popups. I have a button which exists only in the state “Expanded” but does not exist in the state “Normal”. When the button is clicked, the popupmanager creates a window and the state of reverts back to “Normal”, removing the button. Here is the kicker, If I click anywhere outside the popup, the focusmanager throw an error, something about a null value.

After some investigation, It turns out that clicking the button, it first gets focus, which is then passed to the popup when it is created. However since the button has then been removed, the focusmanager somehow gets confused when you try to click back on the main application, and refocus back on the old button. I’ve tried writing a small example, but its not happening, so its probably something i’m doing with Currentstate and its sequence.

You probably won’t experience this with any app you write, but it was bugging the hell out of me!

What is Singularity??

January 9th, 2008

Aral has a new project What the hell is it!!, the suspense is killing me!

Degrafa is AWESOME, I still can’t design though

January 6th, 2008

The main reason Ive been waiting for Degrafa, is the simple fact I’m not a designer. I’m crap at deciding colours, and even worse at deciding what are nice shapes to use on a website.

With Degrafa, the allure of making pretty shapes in MXML and being able to style it via binding and other such features seems pretty tempting. Whilst playing with stateful skins in flex 3, I’ve made a nice button which has unsymmetrical corners, a radial and liner fill, and some nice transitions between the two. However, it still looks a bit clunky, once again proving that I don’t have a designers bone in my body. I will still keep trying though, because I don’t want my flex app to look as samey as the rest.

I just like to say that the Degrafa team have done an awesome job at making styling and skinning as easy as possible, even though I don’t have the talent to use it, yet!

Newb mistake, visible vs alpha

December 29th, 2007

Damn it! Our app uses a movieclip to skin one of the flex components, and it basically requires a boundingbox to help with positioning and layout, so it can fit into the framework. Stupidly, I was drawing an rectangle with alpha colored border, so it wouldn’t display in the animation (its only there so I can read its X/Y position), and this was causing a small performance lag. When you set an items alpha value to zero, the flash player still has to render it to the screen, and thus waste valuable cycles drawing an item you can’t even see. Realising the error of my ways, the component on startup automatically sets the visible property of the sprite to false, thus the flash player won’t waste time rendering it. I’ve only gained a few FPS extra but its a start!

Happy holidays

December 25th, 2007

Its Christmas day, and I’m trying to hunt a bug causing performance lag in my app….

We are having a traditional roast today. Our family decided to have beef wellington, instead of the usual turkey,  should be interesting…

QVM, tamarin AS3 engine for mobiles

December 22nd, 2007

Ted Patrick just posted on his blog that there is a new engine in AS3, aimed specifically for mobile devices, on the way. This is huge news for us flex developers, one of the barriers for moving or porting applications from desktop to something usable in flash lite was the fact that they had to be written in legacy AS2 code.Obviously, Flex as a framework, I wouldn’t imagine as being very usable on such a small screen, but it may pave the way for a Mobile MXML. A lightweight set of components, could allow developers to shift underlying model architectures from existing flex projects and re-craft views for mobile. Although the whole performance thing might make it extremely problematic, but still, one can dream…

http://www.onflex.org/ted/2007/12/meet-qvm-new-tamarin-vm-contributed-to.php

Open source news, Degrafa

December 13th, 2007

Bloody hell, quite a lot going on in the adobe world today.

BlazeDS, Adobe AIR beta, plus a brand new spanking release of Flex 3. In all the chaos, a lot of people might have missed that Degrafa team have announced that they are going to do a release of thier MXML graphics package on january 1st. If you haven’t heard about Degrafa, it basically allows you to generate graphics using MXML type tags, instead of using the programatic skins, and a lot of actionscript code. I’m going to style my app using this package when it comes out. I think its gonna be a real space saver because compiled code, is always gonna be smaller then scalenine embeds.

So check it out

http://www.degrafa.com/