It's necessary to use the "AlertDialogSamples.this" syntax in an inner class when you want to refer to an ancestor class instance. Basically it disambiguates "this" which becomes overloaded when you have nested class instances. Because field accesses and method calls on an enclosing class are automatically inferred for an inner class, you usually only need this special syntax when you need a reference to the enclosing instance (as in the example you give).
Tom. 2009/4/15 Bin Chen <[email protected]> > > I see some of the examples contain such code to refer to "this" > pointer: > > mProgressDialog = new ProgressDialog(AlertDialogSamples.this); > > So this usage has some special meaning other than the standalone > "this"? > > Thanks. > Bin > > > --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

