MessageBoxResult.button1 gives error

Use this forum for an overview of collected bugs and to report new ones.
Post Reply
AposMus
Member
Posts: 236
Joined: Fri Nov 14, 2014 11:41 am
Contact:

MessageBoxResult.button1 gives error

Post by AposMus »

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

The code :

Code: Select all

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 :

Code: Select all

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.
Windows 10 Pro
Cubase Pro 11
Halion 6.4
HSO
Dark Planet

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest