callum123 Posted October 13, 2012 Share Posted October 13, 2012 Hey, having a little trouble here. So i have a memo created and I want to get the text thats inside the memo and then do a test on it to see if its blank. I am trying to do... if guiGetText(descriptionMemo) == "" then random code here else random other code here end For some reason when the memo is blank or if it has value in it, it will skip that line and then do whats in the else. Any suggestions? Link to comment
Aibo Posted October 14, 2012 Share Posted October 14, 2012 where's descriptionMemo defined? Link to comment
myonlake Posted October 14, 2012 Share Posted October 14, 2012 That should work perfectly - simply because I've done this for a hundred times. As Aibo already mentioned, you could check if the descriptionMemo is actually defined somewhere and then make sure you actually trigger those functions correctly. Perhaps give us a little bit more code so we can help you out. Link to comment
callum123 Posted October 14, 2012 Author Share Posted October 14, 2012 I'm not sure why it was not working with the memo, I changed to to an edit box and it worked fine, so I guess I will just use an edit box, thanks for your help. Link to comment
Aibo Posted October 14, 2012 Share Posted October 14, 2012 you can also try to check if the length of the returned string is > 0 using guiGetText(descriptionMemo):len() or utfLen(guiGetText(descriptionMemo)) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now