Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listener Declaration/Instantiation

 
Mark Do
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Question based on the code provided:
1. What are the type of object and type of reference variable of parameter of the callback?
???
2. What is the central point of the code.
Line 05 is essential because it locates the row that contains the delete button that was clicked.
Line 06 is also essential because it gets the tag button in this row.
Line 07 grabs the text on the tag button.
Line 09 removes tag/value from memory.
???
 
Brett Spell
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Do wrote:1. What are the type of object and type of reference variable of parameter of the callback?


The listener is of type OnClickListener . . . but with the caveat that it appears to be intended to be an inner class, so its real type would be something like OuterClass$OnClickListener. I'm guessing that the person (teacher?) asking the question is expecting "OnClickListener" for an answer, though. The parameter type is View, though again its exact provenance is somewhat sketchy.

Mark Do wrote:2. What is the central point of the code.


I think one of us is misinterpreting the question because I have a different understanding of what's being asked. I'd interpret it as a request to summarize what the code does, not identify a particular line (or set of lines) that are of particular importance.
 
Mark Do
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think one of us is misinterpreting the question because I have a different understanding of what's being asked. I'd interpret it as a request to summarize what the code does, not identify a particular line (or set of lines) that are of particular importance.


Ah, you might be right actually.......so would that be just the deleteTag removes both the tag and the value from memory ad deletes the whole row that contains the delete button that was clicked?
 
Mark Do
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so what would you say as the central point of the code?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic