Sunday, November 15, 2009

Back to blogging...

K so I intend to get back to blogging...

last blog was more than 1 1/2 yrs back!!!

So what have I been upto?
Well! here are some
1. I moved to Mumbai for a job. (July 08)
2. Left Capgemini and joined Morgan Stanley (Aug 08)
3. Got married :-) (Mar 09)
4. Well the above has been keeping me quite busy...

Excuses apart, I do intend to get back to blogging and share some knowledge.

Till then....

Saturday, May 17, 2008

Open source IDE for ActionScript 3.0 and Flex

I wasn't aware of there being an open source IDE for ActionScript 3.0 and Flex MXML files.
I just happened to stumble upon FlashDevelop (listed under osflash).

Some of the features I really liked out FlashDevelop are:-
1. Its FREE !!
2. Provides code hinting and code completion for MXML files.
3. Customizable Project templates
4. Community support for plugins
5. It is light on resources unlike Flex Builder.

I still need to start working with projects in FlashDevelop though. Things I guess I would miss out would be Debugging, and the Design view of Flex Builder.

more to follow...

Friday, May 16, 2008

I am an Adobe Certified Flex 2 Developer

I am now an Adobe Certified Flex 2 Developer!!






Cleared the exam today with 85% score at the NIIT centre on MG Road.
Incidentally, I had initially planned to appear for the exam tomorrow and had gone to the center only to register a slot for Saturday. However, all slots for the weekend were full and the next slot would have been only on a weekday.
So I decided to give the exam on the spot, since a slot was available.

It turned out to be a good decision!!

The exam is pretty easy if you have enough working experience working with Flex.
The best place to study for the exam is from the Adobe Flex Help docs.

Sunday, May 11, 2008

Using TreeItemRenderer and callLater()

A friend of mine needed a Tree Component which had images to the right of text labels and also which would have some items disabled.



The simplest way to go about it was to use a custom ItemRenderer for the Tree component. Here is how I tried to solve it...

  1. Extend the TreeItemRenderer class to be used for the Renderer.
  2. Override the createChildren method and add an image component within the renderer.
  3. Access the listData variable and cast it to TreeListData to know whether a node has further subnodes,etc. and then attach the image.
  4. Override the set Data function to check if a node needs to be disabled / enabled and accordingly set the style.
Well, I thought my work was done...But, there still was a problem, the disabled look behaved rather inconsistently going on / off randomly. Here is how I solved the issue.

  1. Use the callLater function to set the enabled/ disabled style. The callLater function defers the calling of the given function until the end of the cycle.
You can check the example here (view source enabled).

Friday, May 9, 2008

Accordion with non responding headers


I came across a peculiar requirement:- An accordion with non responding headers if the container is empty.

I extended the Accordion class and did an override of the set selectedIndex method...This is where the index is set and an event is dispatched.
I ran into trouble when I could not access children of another container within the same component. It always returned me 0 children. The solution being setting creationPolicy="all" this would force the accordion to draw all children during the initial phases. Else it defers this until the component is accessed.

Another problem I encountered was that first time set selectedIndex always get the numChildren as 0. This has been tackled by setting a dirtyFlag for the first time.

The example is here (view source enabled)

Do drop a comment if you find this useful or think it could have been done in a better way.

Friday, April 4, 2008

Setting Prompt on a ComboBox

Just came across the "prompt" property of ComboBox control.
The "prompt" property allows you to set a message for the user to select any option from the dropdown.

Check the image below to view the output.