Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2010, 12:54 PM
Registered User
 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7 ToDo List Code

I imported the downloaded code for Chapter 7 ToDo -2 project into my Eclipse workspace, and an error pops up from the start: "The declared package "com.paad.earthquake" does not match the expected package "com.paad.todolist". The aforementioned package name is given in the EarthQuakeProvider class java file. I have seen an error referenced for this class (a superfluous ')' ) in the threads, but that's not the problem. Anyone have a clue what's up?
 
Old June 1st, 2010, 01:33 PM
Registered User
 
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check the name of the package in the project's AndroidManifest.xml

When you write "aforementioned" are your referring to the .earthquake or .todolist
 
Old July 23rd, 2010, 02:38 PM
Registered User
 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default aforementioned

the reference only makes sense if it has to do with earthquake.
 
Old February 28th, 2011, 01:40 AM
Registered User
 
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Chapter7 RemoveTask, book example is not working

Hello, I'm trying to complete the missing code when removing an item, my problem is with the id type.. thus, KEY_ID is of String type, but when calling removetask is expecting an int.
Your help is highly appreciated.
Thank you.

//id item creation
ToDoItem newItem = new ToDoItem(task, new Date(created), idDb);


//constructor to accept the id from the database
public ToDoItem(String _task, Date _created, String _idDB) {
task = _task;
created = _created;
idDB = _idDB;
}

//pass the id
public boolean removeTask(ToDoItem idDb) {

return db.delete(DATABASE_TABLE, KEY_ID + "=" + idDb, null) > 0;
}

// calling from the TodoLIst activity
toDoDBAdapter.removeTask(todoItems.size()-_index);




Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 ToDo List - modifying existing views floickelsheimer BOOK: Professional Android 2 Application Development 2 April 29th, 2010 11:34 AM
ToDo List Problems - Chapter 4 wolverineik BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 February 28th, 2010 09:29 AM
Chapter 6 Todo List removeItem abowman BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 4 February 5th, 2010 11:18 AM
Issues with Chapter 2 Todo List .add() on key listener Swak BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 2 January 22nd, 2010 06:43 AM
Chapter 4 Customising Your Todo List MMC2 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 May 12th, 2009 08:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.