Wrox Programmer Forums
|
BOOK: Beginning Android 4 Application Development
This is the forum to discuss the Wrox book Beginning Android 4 Application Development by Wei-Meng Lee; ISBN: 978-1-1181-9954-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android 4 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 January 18th, 2013, 07:21 PM
Registered User
 
Join Date: Jan 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2 Dialogs

Hi,

I started going through this book over the last couple of days, and hit problems with the Dialog examples.

The first problem I encountered was with adding the listeners, but then I realised that it auto-generates the listener block for you. So therefore the first dialog example worked fine afterwards

... it is the two progressDialogs that don't work for me. Typing them in from the book flags up an error with the Thread part, i.e.

Code:
new Thread(new Runnable() {
eclipse's suggested solution to this is to create the run block again below the original code. This no longer causes the error, and the program will build. However running the program - I use my Nexus 7, as my PC is a little stretched running Eclipse, plus the AVDs - both progressDialogs don't progress.

I'm guessing here that having the two run() blocks locks the thread or something, but simply moving the code to within the generated block, and deleting the original block flags up a compiler error again.

I've even downloaded the code, which works fine, and matched it - even by printing a listing of both, and looking through both. The downloaded code looks identical to the code I have typed in, but still it doesn't seem to like "in-line threads"...

any ideas ? I have seen it mentioned that things have moved on too far since the book was written, but I am deliberately ensuring that I am compiling using 4.0, no more, no less.

Just to clarify, I have only just started with Java, although I have been using C# for about 6 years on and off.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialogs in VC++ pj_bennett Visual C++ 1 February 10th, 2007 02:20 PM
multiple dialogs using MFC?? sachin_dm Visual C++ 0 April 22nd, 2005 05:33 AM
Windows like dialogs Trevor Miles Classic ASP Basics 3 January 27th, 2005 06:24 PM
Modal Dialogs smcqueen Classic ASP Professional 2 August 21st, 2003 08:19 PM





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