Errata

Flex 4 Cookbook

Errata for Flex 4 Cookbook

Submit your own errata for this product.

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.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
14
Item 2 at top of page

The Java path example is not correct. Looks like it was cut & pasted from the Flex SDK path example.

"2. If the Java runtime is not set properly, set the following PATH variable in your terminal shell:

PATH="${PATH}: ~/flex4SDK/bin"
export PATH"

Anonymous  May 15, 2010 
16
middle of page

"You can also write event handlers in the MXML itself by using the binding tags {} to
indicate that the code inside of the braces should be executed when the event is fired."

Technically, binding tags are not necessary to place ActionScript code within event attributes in MXML. The value of an event handler attribute is ActionScript.

Anonymous  May 15, 2010 
Printed Page 19
clone() code at top

======= Currently reads ================

return new CustomPersonEvent(type, bubbles, cancelable, personValue, timeValue);

======= Should read ==================

return new CustomPersonEvent(type, bubbles, cancelable, person, timeChanged);


The erroneous property names, personValue and timeValue, are the parameter names from the constructor and are out of scope in the clone() method.

Anonymous  Mar 09, 2011 
Printed Page 32
Code snippet after 3rd paragraph

The line above the code snippet says "The swapElementsAt() method swaps the indexes of two elements of a visual container based on the specified index positions:"

The snippet underneath: "myContent.swapElements( 0, 2 );" should be "myContent.swapElementsAt( 0, 2 );"

Dan White  Jul 07, 2011 
Printed Page 34
top of page

<s:Button label = "reorder" click = "reorder();"/>

label can be anything except reorder.Because it is the same as function
name, Flash Builder can not compile it successfully.

Anonymous  Mar 03, 2011 
Printed Page 47
inside toggleResizeMode():void

group.resizeMode is assigned to twice in the ternary statement. The following would suffice:

group.resizeMode = ( group.resizeMode == ResizeMode.NO_SCALE ) ? ResizeMode.SCALE : ResizeMode.NO_SCALE;

Anonymous  Dec 15, 2010 
PDF Page 308
All of section 11.8

See my blog post:
http://flexperiential.com/2010/12/19/o%E2%80%99reilly%E2%80%99s-flex-4-cookbook-continues-to-disappoint/

davidsalahi  Dec 19, 2010 
Printed Page 344
Switzerland

The return type of the compareFunction named sortFunction should be int and not Boolean.

e.g. sortFunction (a:Object, b:Object, fields:Array = null):int

Rico Leuthold  Nov 22, 2011