![]() |
|
Book Updates RIA With Adobe Flex and Java Book Errata
RIA With Adobe Flex and Java Book Errata
By: Yakov Fain
Mar. 9, 2007 08:00 AM
Please submit your findings to the book authors by sending an email at info at faratasystems dot com page 113. Replace the namespace riabook with mafia package com.theriabook.tax{
import com.theriabook.namespaces.*;
public class Tax
{
regular static function calcTax():Number{
return 3500;
}
riabook static function calcTax():Number{
return 1750;
}
}
} page 114. Use mafia namespace to match the changes above use namespace riabook; and the amount of the tax to be paid will be substantially lower. Besides the directive use that affects the entire block of code, AS3 permits finer-grained notation to refer to a specific namespace with a name qualifier (a double colon). In our example, this may look like: tax = Tax.riabook::calcTax(); Page 131, The instructions I would add to page 131 (Gas Station example) after you instruct the reader to add the code snippet so that filtering by message type (the combo box) will occur. I believe you should also add an instruction to the user to add Pages 147-148, listing 4.41 and 4.42 - the following code in listing 4.42: <ctrl:LargeGreenButton greenClickEvent="greenButtonHa should be changed to <ctrl:LargeGreenButton addItemEvent="greenButtonHandl In listing 4.41, the name given to the Event is addItemEvent and that is the event that is dispatched in the greenClickEventHandler function (may want to also change that function's name). So the custom LargeGreenButton component (listing 4.41) does not have a greenClickEvent property but does have an addItemEvent property. Therefore in listing 4.42, where the reader is shown an example of using the LargeGreenButton component, the propery name should be addItemEvent not greenClickEvent. Page 168. After we wrote the portfolio example, Adobe changed the API and explode radius has to be under 1, for example exploderadius=".2". Change it to make the pie slice to work properly on the click event. See the source of this application deployed at : http://samples.faratasystems.com/portfolio/PortfolioRpcDemo.html Page 185, Listing 5.20 (financialnews2.mxml) this line: <mx:XMLListCollection id="newsList" source="{newsFeed.result.channel.item}" /> Page 185, FinancailNews2.mxml exposes a property named security and in PortfolioRPCDemo.mxml binds the security property to the PortfioloView5’s selectedSecurity property. When the program first runs, no item is selected in the datagrid, so the selectedSecurity property is null and thus the value of security is also null. Thus this function in FinancialNews2.mxml may not receive a correct value when the application first starts. Thus the call to newsfeed.send will not have a correct value and the HTTPService will fail and the fault event handler will run. I modified the above function to: So that the HTTPService send method is only called if value has a length. After making this modification the code ran fine from the start. Page 449. Missing comma between the arguments in the signature of the setFormat function. It has two arguments: dgc and formatString. Page 548, listing 13.5 – The loadShow method needs to assign a LoaderContext object when calling photo.load so that it checks crossdomain policy files. The following line photo.load(new URLRequest(photoNode.@source)); should be changed to var context:LoaderContext = new LoaderContext(true); photo.load(new URLRequest(photoNode.@source), context ); Page 552, The call to show.playShow is not required in the service result event code. Page 558, listing 13.11 – The following code if(sound!=null) { sound.play(gotoTime); } should be changed to if(sound!=null) { sound.play(gotoTime * 1000); } Page 562, listing 13.16 – The bindings in the source attribute of the image component should be updated to reference e4x attributes as follows: source=" http://static.flickr.com/{data Page 564, listing 13.18 – The bindings in the dataProvider attribute and code in the change attribute of the gallery TileList component should be updated as follows: dataProvider="{service.lastResult.photos.photo}" change="selectSlide('http://static.flickr.com/' + event.currentTarget.selectedIte Page 615. The first call in the function xlResend() has extra parentheses and should read fxMetadata(); Reader Feedback: Page 1 of 1
|
![]()
|
|||||||||||||||||||||||||||||||||