How to extract the data from files dragged to the panel?

Home Forums General Programming How to extract the data from files dragged to the panel?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23660
    dasfaker
    Keymaster
      • Topics: 80
      • Replies: 793
      • Total: 873
      • ★★★

      I’m starting to deal with with drag&drop files over the panel, and I don’t know how to deal with the files. It seems that the files are converted in StringArrays, how can I extract the data?

      #23661
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★
        for i=0,files:size()-1 do
        		file = files:getReference(i)
        		console (file)
        	end
        

        Watch out no to do files:size(), if you bypass the array size and use getReference() you will break Ctrlr, i need to fix that (i never added a safer StringArray accessor)

        #23674
        dasfaker
        Keymaster
          • Topics: 80
          • Replies: 793
          • Total: 873
          • ★★★

          Thanks Atom.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 86 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr