get nil value from textbox

Started by hmspe, March 30, 2010, 09:37:44 AM

Previous topic - Next topic

hmspe

I need to be able to test that a textbox has a value other than nil so that I can enable an OK button when a form is completely filled.  The GetText, GetLine, GetLineLength, and GetLineCount are all throwing 'nil value not allowed' errors.  Is there a way to test that a textbox has a non-nil value?

Thanks,
Martin

owenwengerd

Quote from: hmspe on March 30, 2010, 09:37:44 AM
The GetText, GetLine, GetLineLength, and GetLineCount are all throwing 'nil value not allowed' errors.

Those are not errors, they are exceptions. Exceptions mean you are doing something wrong. The exception message tells you what triggered the exception. Two common reasons for the one you're getting is using the wrong variable name for the control, or calling the function after the dialog has already been closed and the control destroyed.