added an optional protocol method to retrieve new text and selected item (for further processing)