Chang option menu onSelect callback from anonymous function to method call