This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reference problem within inner class

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
inside my class Gui i've an anonymous inner class; from inside this inner class i need a reference to the outer class

how i did it: inside outer constructor,

then, inside inner, i used 'gui';

isnt there a better way?

TiA
 
Ariel Ortiz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the name of the outer class is , you can use the following within the inner class:

...Ariel
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tested, it works and looks much cleaner

thanks for that
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic