Here's a weird one...
I'm gathering input from the user, with a function that does the "GetTextInput"ing. Then I check to see if it's null. Here's the code...
+ Code Snippetreturn$ = get_user_input()
if return$ <> ""
` do some stuff here
endif
I have this same call and test for about a dozen different pieces of data. But now, all of a sudden, halfway through the code, the very last one I put in is causing the program to stop running.
If I change this one particular test to
+ Code Snippetreturn$ = get_user_input()
if len(return$) <> 0
` do some stuff here
endif
it works fine. But I can never ever use the string match test again in the program, or it crashes. I tried having the function return "INVALID" if the user enters a null, and testing the return string for that, but it still crashes.
I have to use the zero length test from that point on in the program.
So... is there some kind of limit on checking for string matching?
EDIT: And now, adding a line that creates a text object is crashing the program. It's the dreaded
rocess terminated with status -1073741819 (0 minutes, 6 seconds)
This line
crashes the program. I've tried copying all the code to notepad, making a new project, and pasting the code back in, no joy. I am dead in the water if I can't add any more code to my program.
Man, I've got 1500 lines of code in this project, I'd hate to have to start over.
MORE EDIT: The two things seem to be related. I went back and replaced all the
if return$ <> "" with
if len(return$) <> 0 and now I can add more text entities. I changed 8 of them, so we'll see if that lets me put in 8 more text objects.
EVEN MORE EDIT: There is definitely a problem with CreateText and the number of times you can use it. I'm not sure what the limit is, but I have hit it. I can't add any more text entities without either getting an error, or having previously created text objects display corrupted string data.
I've got half a dozen info windows in a program, each time the user opens one, I've been creating the text objects for the window (title, heading, helpful notes, labels, etc.) and then when the user closes the window, I've been deleting the text objects.
Now, I'm going to try creating them all at the beginning of the program, and re-using them, instead of create/delete.
AGAIN WITH THE EDIT: I think I'm narrowing down the problem. By limiting the program to just a couple dozen text objects, and re-using them instead of delete/re-creating them, I think the crashes are going away. Knock on wood.