Jai’s Weblog – Tech, Security & Fun…

Tech, Security & Fun…

  • Jaibeer Malik

    Jaibeer Malik
  • View Jaibeer Malik's profile on LinkedIn
  • Subscribe

  • Feedburner

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 31 other followers

  • Archives

  • Categories

  • Stats

    • 408,586
  • Live Traffic

Posts Tagged ‘ActionScript’

ActionScript/Flex/AIR Code Quality Measurement Tools

Posted by Jai on December 7, 2009


From a java developer perspective, you would love to have the similar code quality measurement tools for ActionScript/Flex/Air also but there is hardly any single comparable tool available for this. After a long search and analysis, this is what I have found and here we will have a look at what all these tools and different utilities offer.

In this post we will analyze what different code quality metrics on a general basis we would require for ActionScript/Flex/AIR and what are the different available tools to get such metrics.

Code Quality Metrics

We would like to have the metrics to display different information like:

  • Coding Styles: The metrics which tell us the different coding style violations inside the code.
  • Coding Standards: The metrics which tell us the different coding standards violations inside the code.
  • Project level: Total number of packages, interface, classes etc. , the dependencies between different packages and classes and their linking.
  • Class level: Total number of lines of code, number of functions, cyclomatic complexity, dependencies on other classes etc.
  • Function level: Total number of lines of code, cyclomatic complexity etc. and coverage tools stating if all the lines of code are fully tested on not.

(This is just on broader level, not covering all the metrics and information which similarly we have for java).

List of Available Tools

The available tools for AcrionScript/Flex/Air code quality measurement are: Read the rest of this entry »

Advertisements

Posted in Flex, Quality | Tagged: , , , , , , , | 7 Comments »

Tips&Tricks: Flexlib SupertabNavigator tab close event handling

Posted by Jai on August 20, 2009


To get handle of tab close event in super tab navigator of flexlib use:


<flexlib:SuperTabNavigator id="tabNavigator"
			popUpButtonPolicy="auto"
			closePolicy="{SuperTab.CLOSE_ALWAYS}"
			tabClose="handleEventCloseTab(event);">
</flexlib:SuperTabNavigator>

private function handleEventCloseTab(event:SuperTabEvent):void
			{
				//Remove data from model in case of a Details tab close
				if (tabNavigator.getChildAt(event.tabIndex) is DetailsTab)
				{
					var obj:DetailsTab=tabNavigator.getChildAt(event.tabIndex) as DetailsTab;
					appModel.list.remove(obj.selectedId);
				}
			}

The event gives you the handle to do tab specific operations on tab close event.

Posted in Flex, Tips&Tricks | Tagged: , , , | Leave a Comment »

Tips&Tricks: Flex expand AdvancedDataGrid tree column on load

Posted by Jai on August 18, 2009


Use displayExpandItems=”true” to expand all the elements of the tree component items on initial load.


<mx:AdvancedDataGrid groupItemRenderer="com.test.CheckBoxTreeRenderer"
				id="dataGrid"
				dataProvider="{appModel.list}"
	 			width="90%"
				height="100%"
				displayItemsExpanded="true">
	 		<mx:columns>
	 			<mx:AdvancedDataGridColumn id="labelColumn" dataField="label" headerText="Data"/>
	 		</mx:columns>
</mx:AdvancedDataGrid>

The problem with expandAll() to be called on creation is that the model may not be updated at that moment.

Posted in Cairngorm, Flex | Tagged: , , | 8 Comments »

 
%d bloggers like this: