Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the reference of the caller Dialog insiede a SelectionAdapter  RSS feed

 
Luk Cora
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i've this situation




Once pressed the button i need to pass to the controller the reference of the Dialog that fired the event. How i can do that considering that i can't use "this" ?
 
Campbell Ritchie
Sheriff
Posts: 53742
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean MyDialog.this?

But why do you need to pass the reference? Why would a method need a reference to a JDialog?
 
Luk Cora
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Do you mean MyDialog.this?

But why do you need to pass the reference? Why would a method need a reference to a JDialog?

Into the dialog i have a form and once it is submitted, i need to render the data plus additional information inside a table contained in the same Dialog. This addiotional information are returned from a controller (another class)
So: i compile the form into the dialog (view). I send the inserted data to the controller that performs some additional operations. The controller should call the method updateTable(parameters to set) contained in the Dialog class. But if i've not the reference to this Dialog how i can call the method?
 
Campbell Ritchie
Sheriff
Posts: 53742
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said, try MyDialog.this
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!