Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Should I clone...?  RSS feed

Marie Mazerolle
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Users of my application can scroll through a list of companies. When they select a company, its details are displayed in textfields and other components.
If the user changes values and then selects another company without saving, I want to display a message to the user to notify him/her.
What is the best way to do that? Should I clone every company object when it's selected, and then when the user selects a new company, compare the original object to the cloned object? It doesn't seem very efficient. Is there a better way to achieve this?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!