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.