Announcement

Collapse
No announcement yet.

Trees!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trees!

    Just sharing smaller way than the suggested code I came up with.


    Just using it once or twice...
    Code:
    file = File.Find("Autoplay\\Docs\\", "*", true, false, nil);
    if (file) then 
    for j,x in pairs(file) do
    Tree.InsertNode("Tree1", "1", {Text = String.SplitPath(x).Filename,Data = x});
    end
    end

    or go big

    GLOBAL!
    Code:
    function Seek(file,tree,pos)
    if (file) then
    for j,x in pairs(file) do
    Tree.InsertNode(tree, pos, {Text = String.SplitPath(x).Filename,Data = x});
    end
    end
    end
    then this where its needed.

    Code:
    file = File.Find("Autoplay\\Docs\\, "*.pdf", true, false, nil);
    Seek(file,"Tree1","1");
Working...
X