Author Topic: [v1.7.5] "Get User Input - Decimal" throws exception with non-numeric input  (Read 1495 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
If the "Initial Value", "Minimum", or "Maximum" fields of the "Get User Input - Decimal" action contain a non-numeric value(including being left blank), executing the action throws an unhandled exception:
Quote
System.InvalidCastException: Specified cast is not valid.
   at ..(Object , EventArgs )
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at VoiceAttack.VABaseForm.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


These fields are textboxes rather than numericupdowns, which take a variable name or a token, as you mentioned earlier:
All fields for "Get User Input - Text", "Get User Input - Choice", "Get User Input - Integer", and "Get User Input - Decimal" are limited to 64 characters(as they were in v1.7.3).

I also noticed the latter two don't check whether the contents of the "Initial Value", "Minimum", or "Maximum" fields are a valid number(They're also textboxes, not NumericUpDown controls).
I think those are text boxes because they accept tokens - I'll have to check the code.


EDIT: Fixed in v1.7.5.4
« Last Edit: April 22, 2019, 10:27:36 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
I think I've got this one wrapped up.  Thanks, man ;)