Archive for the Uncategorized Category

Data Binding Gone Wild!

Posted in Adobe Flex, Flex, Uncategorized with tags , , , , , on October 29, 2008 by devgirl

The ability to base a property of an object off a dynamically changing value is a benefit of data binding that is often unknown or overlooked by Flex developers. However it is an extremely valuable feature and can save a lot of time coding and handling various events, not to mention much cleaner code! This is particularly true for those properties requiring a boolean, such as ‘enabled’ or ‘visible’. The toggle can be done during execution based on a certain sequence of events. The code returning the value for the property can be included within the binding brackets in the case where minimal code is needed to derive the value, or via a function call that returns the value. The following code excerpt shows how this can easily be done in your Flex application. It basically sets the ‘enable’ property of the Delete button to a dynamically derived value that indicates whether a row in the grid has been clicked. Simple as that!

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="" layout="absolute">
			import mx.collections.ArrayCollection;

			private var employeeCollection:ArrayCollection = new ArrayCollection([
				{id:1, firstname:"Tom",lastname:"Taylor", position:"VP Sales"},
	                        {id:2, firstname:"John",lastname:"Jones", position:"Operations"},
	                        {id:3, firstname:"Margaret",lastname:"Miller", position:"VP Marketing"},
	                        {id:4, firstname:"Sarah",lastname:"Sanders", position:"VP Finance"},
	                        {id:5, firstname:"Ron",lastname:"Roberts", position:"Product Manager"},

			private function onDeleteBtnClick(event:MouseEvent):void

	<mx:VBox left="10" top="5" width="480">
		<mx:DataGrid id="emplDataGrid" dataProvider="{employeeCollection}" width="480">
				<mx:DataGridColumn dataField="id" headerText="Employee ID"/>
				<mx:DataGridColumn dataField="firstname" headerText="First Name"/>
				<mx:DataGridColumn dataField="lastname" headerText="Last Name"/>
				<mx:DataGridColumn dataField="position" headerText="Position"/>
		<mx:Button id="deleteBtn" left="10" label="Delete Employee" 
			enabled="{emplDataGrid.selectedIndex > -1}"/>

Comments welcome 🙂

WebManiacs Conference Review

Posted in Uncategorized on May 28, 2008 by devgirl

I spent most of last week in Washington, DC attending the WebManiacs conference. I thoroughly enjoyed the conference, and maxed out my attendance to all the classes I could possibly fit in each day, spending most of my time in hands-on courses. I was impressed with the fact they provided the use of computers (except for the fact that they were running Windows!) and learned a ton in a very short period of time. I have been learning Flex for the past 9 months or so on my own with no formal training, so it was really nice to fill in some of the gaps and also get introduced to Adobe AIR. I’m jazzed up about it and ready to write my first AIR app!

As far as course content of the ones I attended, two in particular stick out as the most bang for the buck. The first, a course about Advanced Skinning and Component Development taught by Michael Labriola that helped me understand the component life cycle much better overall. The second, a high energy class given by Dan Blackman called Flex Messaging and Data Management, which had some really great samples and covered a lot in a short period of time. I had not spent much time working with Data Management Services or Messaging previously and feel like I understand it enough now to go ahead and implement something using it.

The conference was great overall. The only negative was the fact that most of the classes did not have the documentation ready (though we did have an email by Friday night with links to all of the class documentation and source code), and that the courses were spread between two buildings, making it a bit hectic to get to and from each course in a timely fashion. However, I ended the week feeling that the conference was well worth the time and ready to put some of my new knowledge to use! I have decided to start with building my own AIR app, and will post my experience as I go along, so please check back again real soon…