Adobe Flex 4: Training from the Source Vol. 1 Errata (ISBN 0-321-66050-1)

Readers of this book are invited to join and participate in the Flex Training from the Source discussion group

This page contains a list of known issues, in addition to user reported issues that are still being investigated.

You can download the kindle or e-book lesson files here
Lesson 2
Page 39 Issue - Step 15 - The reader is asked to press Flash Builder's "resume" button when the application launches. At the time, this button is unavailable.
Solution - Instead of pressing the "resume" button within Flash Builder, press the "Click Me" button within the running application.
Lesson 3
Page 56 Issue - Step 13 - The spark button with the property: label="Flex" should read: label="FlexGrocer".
Solution - Change the button from
	<s:Button label="Flex" x="5" y="5"/>
							
							
to
	<s:Button label="FlexGrocer" x="5" y="5"/>
							
							
Page 69 Issue - Step 7 - The included screenshot displays a "View Cart" button in "State1" and "cartView" states.
Solution - At this point in the chapter, the "View Cart" button has been included in "State1" exclusively.
Lesson 4
Page 82 Issue - Step 9 - The highlighted <mx:Image/> tag in step 8 contains a 'includeIn="State1"' property, this <mx:Image/> tag does not need this property.
Solution - Change the image tag from
	<mx:Image includeIn="State1" scaledContent="true" source="@Embed('assets/dairy_milk.jpg')"/>
							
to
	<mx:Image scaledContent="true" source="@Embed('assets/dairy_milk.jpg')"/>
							
Page 87 Issue - If you run the code at the top of the page, there is a large space before the word "happiest!"
Solution - Change
	<description/>Direct from California where cows are
	happiest!</description>
							
							
to
	<description/>Direct from California where cows are happiest!</description>
							
							
Lesson 5
Page 105 Issue - Towards the bottom end of the code block, the mxml opening for an intended <s:Label/> is missing.
Solution - Change the s:HGroup from
	<s:HGroup creationComplete="addToTextArea('HBox creationComplete')">
	creationComplete="addToTextArea('Label creationComplete')"/>
		<s:Button
	creationComplete="addToTextArea('Button creationComplete')"/>
	</s:HGroup>
							
to
	<s:HGroup creationComplete="addToTextArea('HBox creationComplete')">
		<s:Label
	creationComplete="addToTextArea('Label creationComplete')"/>
		<s:Button
	creationComplete="addToTextArea('Button creationComplete')"/>
	</s:HGroup>
							
Lesson 7
Page 155 Issue - Step 14 - Refers to the script block as the <mx:Script> block.
Solution - This is meant to say <fx:Script> in the place of the deprecated <mx:Script> tag.
Lesson 8
Page 181 Issue - Table 8.1 - The given data examples are not grouped correctly.
Solution - The data examples should be understood as follows:

Data as Nodes:
<product>
	<prodName>Milk</prodName>
</product>
							

Data as Attributes:

<product prodName="Milk"/>

							
*The table should clearly illustrate the difference between "Data as Nodes" and "Data as Attributes."

Page 185 Issue - Step 20 - The reader is asked to create a variable named groceryInventory but the text does not specify a type.
Solution - The groceryInventory variable is of type ArrayCollection.
Page 189 Issue - Step 6 - The included screenshot displays a "Remove From Cart" button.
Solution - At this point in the chapter, the button has not yet been created, we add the button on page 197.
Page 193 Issue - Step 12 - The included screenshot displays a "Remove From Cart" button.
Solution - At this point in the chapter, the button has not yet been created, we add the button on page 197.
Lesson 9
Page 213 Issue - Step 8 - Refers to the removeFromCart() function as removeCart().
Solution - Keep the naming consistent with the code examples, name it removeFromCart() instead of removeCart().
Page 216 Issue - Step 13 - Refers to the handleViewCartClicked(event) instead of handleViewCartClick(event).
Solution - Keep the naming consistent with the code examples, call it handleViewCartClick(event) instead of handleViewCartClicked(event).
Page 227 Issue - Step 3 - The example shows an import statement for mx.rpc.events.ResultEvent class before the class has been used.
Solution - Change the code from:
	import mx.collections.XMLListCollection;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.http.mxml.HTTPService;
							
to
	import mx.collections.XMLListCollection;
	import mx.rpc.http.mxml.HTTPService;
							
Page 234 Issue - Step 21 - Refers to the ShoppingView class incorrectly.
Solution - You can find the instance of the ShoppingView class in the FlexGrocer.mxml file.
Lesson 10
Page 243 Issue - Step 2 - The "New MXML Component" window does not show layout, width, or height fields.
Solution - To create the same component, you can leave those fields blank on your machine. If you desire a base layout and confined width and height, you can add this within the component creation window.
Page 249 Issue - Step 7 - The itemRenderer property of the example DataGroup is incorrect, it references a class that does not exist.
Solution - Change the code from:
	itemRenderer="views.ProductItem"
							
to
	itemRenderer="components.ProductItem"
							
Lesson 11
Page 277 Issue - Step 6 - The clone() function is written with the syntax "public override function clone():Event { ... }".
Solution - On p. 267, the same function is written with the syntax "override public function clone():Event { ... }". Both versions compile and run fine, but the preferred syntax is: "override public...".
Page 283 Issue - Step 1 - Says to open ShoppingCartView.mxml from the views package.
Solution - It's actually called ShoppingView.mxml, keeping the names consistent with prior examples.
Page 284 Issue - Step 5 - The handleItemsChanged() method is created, but it is not specified as private.
Solution - The handleItemsChanged() method should be private.
Lesson 12
Page 319 Issue - Step 1 - Mentions "Item Renderer for XM AdvancedDataGrid".
Solution - The mentioned Item Renderer should be "Item Renderer for MX AdvancedDataGrid".
Page 321 Issue - Step 5 - Gives an example of an AdvancedDataGrid tag that is missing its 'height' property.
Solution - Change the code from:
	<mx:AdvancedDataGrid creationComplete="myGroup.refresh()"
		defaultLeafIcon="{null}">
							
to
	<mx:AdvancedDataGrid creationComplete="myGroup.refresh()"
		defaultLeafIcon="{null}" height="200">
							
Lesson 13
Page 335 Issue - Step 5 - Says to place a breakpoint at the closing brace of the doDragDrop() function, this function does not exist.
Solution - Place the breakpoint on the closing brace of the targetList_dragDropHandler(event:DragDropEvent) function.
Page 342 Issue - Step 19 - Instantiates the myLabelData variable differently than shown in step 17.
Solution - Change the code from:
	private function doDragDrop(event:DragEvent,format:String):void{
		var myLabelData:Object = new Object();
		myLabelData = event.dragSource.dataForFormat(format);
		myList.dataProvider.addItem(myLabelData);
	}
							
to
	private function doDragDrop(event:DragEvent,format:String):void{
		var myLabelData:Object = event.dragSource.dataForFormat(format);
		myList.dataProvider.addItem(myLabelData);
	}
							
Page 346 Issue - Step 16 - The "TIP" refers to ShoppingCartItem as valueObjects/ShoppingCartItem.as.
Solution - The real file path is cart/ShoppingCartItem.as.
Lesson 18
Page 449 Issue - Step 18 - The quantityLabel.text property is set to "ShoppingCart + (" + shoppingCart.items.length + ")".
Solution - The quantityLabel.text property should be set to "Shopping List (" + shoppingCart.items.length + ")".
Book Image
Please email possible new errata to answers AT digitalprimates dot net