400greyBike:
Syntax/Capability escapes me here, any gentle pointers would be greatly appreciatedCode section below.
If the button is being specified elsewhere in your code then return it as an enumerated value instead of as a string or String. Then you can use a plain old numeric comparison (or use it in switch cases etc) without having to do string comparisons everywhere.