Jorge D Ortiz wrote: > Thanks to both. That was my understanding, but then I run into a > problem with the java language. If I declare the rowId variable as > local in the onOptionsItemSelected() then the compiler complains that: > "local variable rowId is accessed from within inner class; needs to be > declared final". > And declaring it as a class variable seems like an overkill to me.
As the error message says, declare it final: final long rowId=getSelectedItemId(); -- Mark Murphy (a Commons Guy) http://commonsware.com Warescription: All titles, revisions, & ebook formats, just $35/year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

