Got it, I'll post the snippet this week, but here's the temporary snippet for the purposes of debugging. At the end, Text_x contains the full array of arrays, including the code blocks.
Some of it is probably redundant, like maybe removing the carriage returns. Will confirm during the week.
Thanks everyone, for your help and suggestions.
Code: Select all
Text_c := memoread("TempArry.txt")
Text_c := AllTrim( Text_c )
Text_c := StrTran( Text_c, ";", "" )
Text_c := StrTran( Text_c, Chr(13), "" )
Text_c := StrTran( Text_c, Chr(10), "" )
Char_c := Right( Text_c, 1 )
Char_c := Left( Text_c, 1 )
If Right( Text_c, 1 ) = "}"
Text_c := Left( Text_c, Len( Text_c )-1 )
Endif
// Trim it, and compare
Text_c := AllTrim( Text_c )
If Left( Text_c, 1 ) = "{"
Text_c := " " + SubStr( Text_c, 2 )
Endif
// Trim it, and compare.
Text_c := AllTrim( Text_c )
// Check one more time.
Char_c := Right( Text_c, 1 )
Char_c := Left( Text_c, 1 )
Text_x := { &Text_c }
This is the full array. It's completely imported from the text file into a run-time array, at the finale of the debugging session above.
{ ;
{"First","First Item", ;
{{"First SubItem", "First SubItem from First", {||qout("First SubItem from First")}},;
{"Second SubItem", "Second SubItem from First", {||qout("Second SubItem from First")}},;
{"Third SubItem", "Third SubItem from First", {||qout("Third SubItem from First")}} } ;
}, ;
{"Second","Second Item", ;
{{"First SubItem", "First SubItem from Second", {||qout("First SubItem from Second")}},;
{"Second SubItem", "Second SubItem from Second", {||qout("Second SubItem from Second")}},;
{"Third SubItem", "Third SubItem from Second", {||qout("Third SubItem from Second")}} } ;
}, ;
{"Third","Third SubItem",0}, ;
{"Fourth","Fourth SubItem",{||qout("Fourth SubItem")} } ;
}