PDA

View Full Version : Interface.ShowMessageBox()



andi06
September 29th, 2015, 04:58 AM
I think that there is a bug in this routine.

The prototype is void ShowMessageBox(...,...,...,...,dontShowAgainToken) ;

There is an overloaded alternative without the final parameter and according to the comments this should create a dialogue without the Don't Show Again checkbox.

However if I call with the alternative syntax I am still getting the checkbox, and if I happen to check the checkbox the method stops working altogether, suggesting that a null string is being added to the list of tokens to be ignored.

I haven't checked this as thoroughly as I would normally do because it just takes too long to modify scripts and reload them without trainzutil -compile to tell me that I've forgotten a semi-colon.

As an alternative could this be provided as string ShowMessageBox() returning its result directly rather than via messaging. If this could be done and could suspend the thread pending a response it would be a powerful debugging tool.

WindWalkr
September 29th, 2015, 09:48 AM
Entirely likely. None of that new script stuff is finished yet. We'll let you know when we think it's ready for use/testing.

chris

WindWalkr
September 29th, 2015, 09:50 AM
As an alternative could this be provided as string ShowMessageBox() returning its result directly rather than via messaging. If this could be done and could suspend the thread pending a response it would be a powerful debugging tool.

Not really, no. Or rather- if you're in a context where that is possible, then you could already do it yourself. In the contexts where it isn't possible for you, it's not possible for us either.

chris