Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 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 March 4th, 2009, 10:45 AM
Registered User
 
Join Date: Feb 2009
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Code not going as planned: "icicle" vs "savedinstancestate"

Hello:

I am new to the eclipse platform, and I haven't programmed in quite some time (have some experience in Visual Basic and C). Not sure if this problem is related to the dev-environment or specific Java SDK I'm using.

But in Chapter 2, the Hello World program, I have followed all prior steps in the book, except that the code that the JDT automatically fills in has the lines:

----public void onCreate(Bundle savedInstanceState) et. al----

whereas the book describes that the same line should have been:

----public void onCreate(Bundle icicle) et. al----

Why is this? Where does this discrepancy arise from and has no one else experienced this? It's a minor discrepancy, but I am wondering if this is only the beginning of a slough of problems I may eventually have to overcome.

I am using
Eclipse Ganymede 3.4.2 build M20090211-1700
Android SDK 1.1 r1
JDK 6 u12

There is another issue which I will post in another thread.
Reply With Quote
  #2 (permalink)  
Old March 4th, 2009, 10:53 AM
Reto's Avatar
Wrox Author
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2008
Location: London, United Kingdom
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

What you're seeing shouldn't cause any problems, it's a hold-over from an earlier release of the SDK which defaulted the parameter name in the onCreate method to 'icicle' rather then 'savedInstanceState'.

Given that what's changed is just the parameter name (rather than the class -- Bundle -- being passed in) you can use either name, as long as you use it consistently if you access it within that method.

Hopefully that's one of the few inconsistencies you'll find, but if you do spot any other problems I'll be more than happy to try and help solve them.
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
The Following User Says Thank You to Reto For This Useful Post:
joopthecat (March 5th, 2009)
  #3 (permalink)  
Old March 5th, 2009, 10:49 AM
Registered User
 
Join Date: Feb 2009
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you very much, Mr. Meier, for this and your reply to my other posted question. As far as this particular subject is concerned, I suppose I would need to keep abreast of all future changes, minor or not, so as to avoid confusion.
Reply With Quote
  #4 (permalink)  
Old May 3rd, 2009, 03:09 PM
Registered User
 
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ha! I was confused about that, too. (savedInstanceState, of course, being far more intuitive than the wintry wonderland Christmas spirit of icicle.)

Maybe not really an errata as the other code will work, but worth an official note?

Were there other terminology changes in the lifecycle stuff of which we should be aware?
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
Downloaded code: "20-4" missing Rachel BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 1 February 16th, 2009 05:00 PM
how to read xml files doing select="document()" ? eruditionist XSLT 2 February 10th, 2009 04:08 PM
Message received by "FILE" adapter is suspended skindika Biztalk 0 February 2nd, 2009 06:06 PM
WebPart not supporting/enabled displaymode other than "Browse" amitjoshipune ASP.NET 2.0 Professional 1 January 9th, 2009 01:34 PM
google Response.Write(Request.QueryString("q")) senol01 ASP.NET 2.0 Basics 1 January 2nd, 2009 11:01 AM



All times are GMT -4. The time now is 06:18 PM.


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