Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > BOOK: Adobe AIR: Create - Modify - Reuse ISBN: 978-0-470-18207-9
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Adobe AIR: Create - Modify - Reuse ISBN: 978-0-470-18207-9
This is the forum to discuss the Wrox book Adobe AIR: Create - Modify - Reuse by Marc Leuchner, Todd Anderson, Matt Wright; ISBN: 9780470182079
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Adobe AIR: Create - Modify - Reuse ISBN: 978-0-470-18207-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 23rd, 2009, 03:46 PM
Authorized User
Points: 69, Level: 1
Points: 69, Level: 1 Points: 69, Level: 1 Points: 69, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default Error during program execution (Ch 2 Text Editor)

I'm working on the Text Editor example and when I try to run program in order to save new or open existing file I'm getting error

TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@8b4d971 to mx.events.FileEvent.

I'm not working in Air SDK, instead I'm using Flex Builder 3

Any ideas? Thanks
Reply With Quote
  #2 (permalink)  
Old January 27th, 2009, 02:35 PM
Authorized User
Points: 69, Level: 1
Points: 69, Level: 1 Points: 69, Level: 1 Points: 69, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default Error in the book

As I find out from source code it was an error in the book.

Instead of
Code:
private function onFileOpenSelect( event: FileEvent) : void
{
                currentFile = event.file as File;
                openFile();
}
should be
Code:
private function onFileOpenSelect( event: Event) : void
{
                currentFile = event.target as File;
                openFile();
}
and instead of
Code:
        
private function onFileSaveSelect( event: FileEvent) : void
{
                currentFile = event.file as File;
                textChanged = false;
                title = "Text Editor - " + currentFile.name;
                saveFile();
}
should be
Code:
        
private function onFileSaveSelect( event: Event) : void
{
                currentFile = event.target as File;
                textChanged = false;
                title = "Text Editor - " + currentFile.name;
                saveFile();
}
I'm submitting this for Errata as an error if someone here at Wrox care about it. Thanks
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem during execution of php program greenday Beginning PHP 2 November 12th, 2007 03:51 PM
Ch. 7 - Managing Reports Using Program Code MER78 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 September 27th, 2004 08:15 AM
Problems with the editor example in ch 10 arne Beginning PHP 4 August 21st, 2004 02:24 PM
How to terminate program execution without "End" pavel Beginning VB 6 2 September 2nd, 2003 06:20 PM



All times are GMT -4. The time now is 02:56 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.