Allowing button.method attributes to be changed dynamically