The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
| Version |
Location |
Description |
Submitted By |
| Printed |
Page 1
Page 180, 1st paragraph, 1st line. |
From the last line of page 179 to the first 2 lines of page 180.
It's said:
"In this case, the button has a green and italicized label because the local style definition takes precedence over the external stylesheet, only because it appears after the external stylesheet included in the code."
I think it should be:
"In this case, the button has a green and italicized label NOT because the local style definition takes precedence over the external stylesheet, only because it appears after the external stylesheet included in the code."
|
Haibo Liu |
| Safari Books Online |
6.1.1
6.1.1. Working with Children |
In the paragraph right after example 6-2 Reordering children using the display list API. In the last sentence:
After the last child index is retrieved, setChildIndex() is called and passes a reference to the button instance and a new index.
The "button" Should be changed to "label". The correct sentence is shown below:
After the last child index is retrieved, setChildIndex() is called and passes a reference to the label instance and a new index.
|
Anonymous |
| Printed |
Page 9
3rd paragraph |
There's a minor typo:
The sentence
"The exact number and types of tiers an application has depend on many factors."
should probably read
"The exact number and types of tiers an application has depends on many factors."
|
Scott A Thisse |
| Printed |
Page 15
2nd paragraph from the bottom |
There's an extraneous ` in the word Flex.
|
Scott A Thisse |
| Safari Books Online |
19.5
after 3rd paragraph |
example metadata tag for a 'horizontalGap' style uses incorrect inheritance attribute...
[Style(name="horizontalGap",type="int", inheriting="false")]
but according to the adobe online reference this should be re-written:
[Style(name="horizontalGap",type="int", inherit="no")]
http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html
|
Paul Evans |
| Safari Books Online |
19.5
after 9th? paragraph |
<page-extract>
Here is the getter function that attempts to retrieve a valid value from getStyle(). If it does not find a valid value, it will return a default value of 5.
private function get horizontalGapDefault():int
{
var horizontalGap:Number = getStyle("horizontalGap");
return (horizontalGap == undefined ? 5 : horizontalGap);
}
</page-extract>
In the above page-extract, the code will not perform as intended. As my compiler warns :
"1012: Variables of type Number cannot be undefined. The value undefined will be type coerced to Number before comparison."
So, when the second line of the function executes, horizontalGap actually holds NaN, therefore the test for undefined fails and 5 will never be returned.
Additionally it would be slightly nicer if we were attempting to return the type indicated in the function (i.e. int rather than Number). Note: int can't be set to undefined either. It gets set to zero.
|
Paul Evans (creacog) |
| Printed |
Page 23
Note at the bottom of the page |
The compiler option "default-background-colorph" doesn't exist; the intended option is probably "default-background-color".
|
Scott A Thisse |
| Printed |
Page 37
3rd paragraph |
Page 37, third paragraph states, "A module document is used to define an MXML module, which you'll learn more about in Chapter 9."
However, no mention at all is made of MXML modules anywhere in Chapter 9, only MXML components, which are clearly stated in the book (and by Flex definition) to not be the same thing.
There appears to be no section at all in the book to explain the use and definition of MXML modules as opposed to components, which appears to be a large omission in the book of this breadth and comprehension.
Please include a section on Modules in the next edition.
|
Ivan Kanski |
| PDF |
Page 38
Understanding namespaces |
On this page author referenced about manifest file ("As shown in Chapter 2, a manifest file maps an ActionScript class to an identifier: the MXML tag name.") and .swc files ("This namespace URI is set when the .swc file is compiled, as described in Chapter 2.") in Chapter 2. But there is no nothing about it in Chapter 2.
|
Anonymous |
| Printed |
Page 38
4th paragraph, 2nd paragraph of Understanding Namespaces |
The paragraph begins, "As shown in Chapter 2, a manifest file maps an ActionScript class to...". That topic is not addressed in Chapter 2, but is addressed in Chapter 20.
|
Michael Maddox |
| Printed |
Page 51
2nd line from bottom |
The end quote for "Understanding ActionScript Syntax" is misprinted as an empty-box placeholder.
This same typos occurs on pages 50, 58, and others.
|
Scott Thisse |
| Printed |
Page 55
3rd paragraph that starts "Many developers..." |
For the domain stated, examplecompany.com, the package name would be com.examplecompany, not com.example .
|
Scott Thisse |
| Printed |
Page 56
1st paragraph |
There is a minor typo on the 6th line -- the keyword "package" is split across lines w/o a hyphen.
|
Scott Thisse |
| Printed |
Page 77
1st paragraph |
The important concept of loading XML data is pretty much omitted here. After all aren't we supposed to separate the content? Showing the complete code and details to load the XML using ActionScript 3 would have been much appreciated here.
I finally did find code that compiled after much trial and error and learned all about how the swf had to be embedded in html and the xml must be in the same domain (I uploaded all three files to my website to avoid the security sandbox).
A very deep important thing to learn because dynamic xml loading at runtime is better than recompiling swfs all the time. Here is the ActionScript 3 code I found online.
package
{
import flash.display.Sprite;
import flash.errors.*;
import flash.events.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
public class ExternalDocs extends Sprite
{
public function ExternalDocs()
{
var request:URLRequest = new URLRequest("http://www.cbl-productions.com/books.xml");
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandler);
try
{
loader.load(request);
}
catch (error:ArgumentError)
{
trace("An ArgumentError has occurred.");
}
catch (error:SecurityError)
{
trace("A SecurityError has occurred.");
}"
}
private function completeHandler(event:Event):void
{
var dataXML:XML = XML(event.target.data);
trace(dataXML.toXMLString());
}
}
}
|
Craig Lund |
| Printed |
Page 85
First note |
In first note on page 85, next to last line, there's a box instead of a right quotation mark at the end of the reference "Understanding Application Domains"
|
Anonymous |
| Printed |
Page 119
2nd line of page |
The sentence says, "In this example, we declared two ColumnConstraint instances...". What the code fragment declares is actually two ConstraintColumn instances.
|
Anonymous |
| Printed |
Page 149
code after 5th paragraph |
example code:
var xml:XML = <items><item>a</item><item>b</item><item>c</item><item>d</item></items>;
var collection:ICollectionView = new XMLListCollection(xml.children());
to actually compile without errors should be:
import mx.collections.ICollectionView;
import mx.collections.ArrayCollection;
import mx.collections.XMLListCollection;
private function makeCollection():void
{
var xml:XML = <items><item>a</item><item>b</item><item>c</item><item>d</item></items>;
var collection:XMLListCollection = new XMLListCollection(xml.children());
list.dataProvider = collection;
}
|
Craig Lund |
| Printed |
Page 149
last code example (149-150) |
code is broken. Like much of the code examples in this book, there are methods, functions etc. missing. I have struggled with many examples in this book and the previous Flex 2 book and figured out what was missing.
While this can be educational, it is also frustrating to compile the code and receive so many time consuming errors that distract from the focus of the lessons.
Other sources of code usually show the complete code with the code that is being examined set in bold. At least this way, novices can actually work with it.
|
Craig Lund |
| Printed |
Page 179
3rd paragraph |
The first sentence of the 3rd paragraph states "Type selectors always take precedence over class selectors." It should read "Class selectors always take precedence of type selectors."
|
Brian Sterling |
| Printed |
Page 179
3rd paragraph |
First sentence reads: "Type selectors always take precedence over class selectors.". This is incorrect; it's the other way around, just as the book points out on pages 174 and 182.
|
Joe Berry |
| Printed |
Page 293
coding example |
Error:
The class SoundPlayer's function play() will not play the file upon opening. The "Play" button in the MXML application does not function unless the "Stop" button is played first.
Debugging:
If Play() works after Stop() this is because Stop() attributes a value to _currentPosition, namely 0. Play() needs a value for _currentPosition to start playing.
Solution:
Set _currentPosition to 0 in the SoundPlayer constructor
so that play() can function as intended.
Code correction:
Code to be added in the body of
public function SoundPlayer(url:String):
_currentPosition = 0;
|
Anonymous |
| Printed |
Page 312-313
Example 12-11 and 12-12 |
The <item> nodes in the sample XML in Example 12-11 all have an "item" attribute, except for the last <item> node, which has an "itemName" attribute instead.
When this sample XML is referenced in Example 12-12 in the parseFromXML() method, it assigns the "name" variable the value of "xml.@itemName". Clearly, this will only work for the last <item> node.
Either all the "item" attributes need to be changed to "itemName" in the XML or the "xml.@itemName" needs to be changed to "xml.@name" in the parseFromXML() method and the final <item> node in the XML needs to be changed to match.
The latter would seem to make more sense given the convention of assigning "type" to @type, "label" to @label, etc., but that's just my 2 cents.
|
Cade Truitt |
| Printed |
Page 370
example 14-1 user Class and create Instance MXML example |
I got all the code input and compiled error free but the result is what?
All I see is a blank application. The exercise should have an end result shouldn't it?
Use in any practical way still seems awfully vague to me.
|
Craig Lund |
| Printed |
Page 370
example 14-1 user Class and create Instance ActionScript example |
The incomplete example does not address handling the {new Date()} portion. Just adding the wo or three lines of code rather than "etc." would have been much more preferable.
I have tried various syntaxes but get a type error or a syntax error when trying to compile.
|
Craig Lund |
| Printed |
Page 455
bottom |
The text refers to an HTTPService object.
The example code to create an object is (bottom of page 455):
var httpRequest:HTTPRequest = new HTTPRequest();
Example 17.6 uses,
_service = new HTTPService();
Neither Adobe's documentation http://livedocs.adobe.com/flex/3/langref/
nor the Flex Builder environment reveal the existence of any HTTPRequest class.
Therefore it appears to me that the example code at the bottom of page
455 should be
var httpService:HTTPService = new HTTPService();
This threw me for quite some time because I recall creating HTTPRequest objects in javascript a while back.
Also, there is an HTTPRequestMessage class. The book does not explain this (that I've found so far at least).
If this is not an error then I would appreciate clarification of the relationship between HTTPService, HTTPRequest, and HTTPRequestMessage classes as well explanation of how to create an HTTPRequest object when this class doesn't seem to exist.
thank you,
-Eric Saund
new Actionscript developer
|
Eric Saund |
| Printed |
Page 562
Top of the page |
Has a reference to the non-existent "resolveFile" method, it should refer to "resolvePath" instead.
i.e. File.applicationStorageDirectory.resolvePath("example.db"); instead of File.applicationStorageDirectory.resolveFile("example.db");
|
Kirill Mazin |