Quantcast
WoWInterface - View Single Post - How do I force an editbox widget to numberic but allow negative?
View Single Post
06-08-20, 09:32 PM   #2
Kanegasi
A Firelord
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 499
When the user enters a value, run it through local number = tonumber(input) which will accept negative numbers. If tonumber returns a number, accept the value and continue. If it returns nil, reset the EditBox to the last value, maybe even give an error.
  Reply With Quote