Crash LC with just a slash
Posted: Mon Mar 28, 2016 10:02 pm
I am a newbie at writing to external text files. I made a new stack (v. 6.7.9) with one button. It is an instance of a project I am working on. In the button script:
Click the button with the first "put..." line, I get "Can't open that file. Well, I will figure this out, because a standalone for Windows with much the same code works just fine.
But, if I use the second "put.." line, with the forward slash appended, LC shuts down at the "write" line with a spinning beach ball. It cannot be force-quit. I have to restart.
Oddly, when I do try to force quit, the name of the LC application disappears from the list of open apps in the force-quit dialog, but all stack windows stay put. The rest of the computer works just fine. If I then go to the Activity Monitor, I see the LC process, appended with "not responding", like in the force-quit dialog, but my efforts to quit from that place fail. Restarting is the only way out.
So, notwithstanding I may have syntax errors in properly delineating the pathname, what is with that sinister slash?
I have the stack, but I do not recommend opening it unless everything else is saved, and you have a few spare minutes to waste. I will send it to to QCC unless someone sees what I am doing so egregiously wrongly.
Craig Newman
Code: Select all
on mouseUp
answer folder "XYZ"
put it into tPath --DEOS NOT WORK, BUT AT LEAST NO CRASH
--put it & "/" into tPath --THIS WILL CRASH LC BIGTIME
open file tPath for text write
write "ABC" to file tPath
close file tPath
end mouseUp
But, if I use the second "put.." line, with the forward slash appended, LC shuts down at the "write" line with a spinning beach ball. It cannot be force-quit. I have to restart.
Oddly, when I do try to force quit, the name of the LC application disappears from the list of open apps in the force-quit dialog, but all stack windows stay put. The rest of the computer works just fine. If I then go to the Activity Monitor, I see the LC process, appended with "not responding", like in the force-quit dialog, but my efforts to quit from that place fail. Restarting is the only way out.
So, notwithstanding I may have syntax errors in properly delineating the pathname, what is with that sinister slash?
I have the stack, but I do not recommend opening it unless everything else is saved, and you have a few spare minutes to waste. I will send it to to QCC unless someone sees what I am doing so egregiously wrongly.
Craig Newman