Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Hello,
I don't see where I am going wrong.
Can someone help me point out what I am doing wrong. I know its probably a very stupid mistake.
Been at this for hours now
on mouseUp
local tFolder, tFileList
answer folder "Select the Folder"
put it into tFolder
set the defaultFolder to tFolder
put filteredFolders() into mainfolder
----- having problem from here on
put 1 into tcounter
repeat for each line tItem in mainfolder
put tItem into folderArray[tcounter]["fldname"]
put tFolder & "/" & tItem into folderArray[tcounter]["fldpath"]
put filteredFilesWithPaths() into folderArray[tcounter]["filepath"]
put filteredFiles() into folderArray[tcounter]["filenopath"]
add 1 to tcounter
end repeat
set the dgText of group "DG" to folderArray --- returns no keys
set the dgData of group "DG" to folderArray --- returns every line as a key
--- but datagrid remains empty.
end mouseUp
Or you use dgData (array solution) or you use dgText (tabbed grid text solution), you can't use both.
Remember that the array organization is the following: dgData[row][column_name], where row is an integer and column_name is a string.
Column in array and column name (not label) in datagrid must be the same.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Nope, I don't. All of them give me valid output.
This code works when there is only 1 item inside the repeat loop.
When I have more than one, I get no output.
Hi Max,
Sorry, I did not comment out one of the dgtext/dgdata in the above code.
But i used only 1 at a time. I tried the other to see if that worked by chance; it did not.
When I print the keys out for each method,
i get the results are stated above.