MessageBoxResult.button1 gives error

I was working on a message box for my project and ran into this problem.

The code :

myMessage = {}
  
myMessage.type = MessageBoxType.question
myMessage.text = "Test for Button 1"
myMessage.button1 = "Click Button"
  
repeat
    result = messageBox(myMessage)
until result == MessageBoxResult.button1 or result == MessageBoxResult.escape
print(result)

returns the error : Error: no static ‘button1’ in class 'MessageBoxResult’

If you change the button to button2, it works fine :

myMessage = {}
  
myMessage.type = MessageBoxType.question
myMessage.text = "Test for Button 2"
myMessage.button2 = "Click Button"
  
repeat
    result = messageBox(myMessage)
until result == MessageBoxResult.button2 or result == MessageBoxResult.escape
print(result)

but seeing as button1 is the default and is always displayed, now you have to buttons on your modal window.