I added a handler to my stack that reads a number of .txt files from a folder and stores their content in an array. It uses the
defaultfolder property and the
files keyword to get the list of files to process. At first, the handler was working fine and producing the expected results, but then the next time I opened LiveCode it was no longer working correctly. After some debugging, it seems like defaultfolder property is not retaining the value I give it when I use the
set command. I even created a new mainstack and put this code into a button...
Code: Select all
on mouseUp
set the defaultfolder to "./data/ships/"
put the defaultfolder into fld 1
end mouseUp
...Which should set the defaultfolder to a path relative to where the .livecode stack resides. However, when the button is pressed, the value that gets put in field 1 is "/Users/vbro/Applications". What am I missing here?